- 07 Oct 2024
- 1 Minute to read
- DarkLight
- PDF
Create Session Creation Token
- Updated on 07 Oct 2024
- 1 Minute to read
- DarkLight
- PDF
The Create Session Creation Token API generates a new session creation token for existing transactions. A new session creation token is required when the old token has expired and the transaction is still valid.
Syntax
POST /api/transaction/transaction_id/token
Examples
Example request
POST /api/transaction/dcaad720-d1e9-47ba-a76b-a6370ef0373b/token HTTP /1.1
Host: onespan.com
Accept: application/json, text/javascript
Sample payload:
{
"role": "unknown"
}
Example response
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"token": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uIjp7InJvbGUiOiJ1bmtub3duIn0sInNjb3BlIjpbInNlc3Npb25fY3JlYXRpb25fYXV0aG9yaXphdGlvbl9jb2RlIl0sInRyYW5zYWN0aW9uX3V1aWQiOiJjZTMxYjljYy1hNzIyLTRmZDctYmI3YS03MDMxM2RhNDg0OGMiLCJleHAiOjE2MjM5MzkxOTksImp0aSI6IjIxOTM1YjVkLTE4OTMtNDIxOC1iMjUwLTdjZTNlYzZlYjE5NSIsImNsaWVudF9pZCI6ImRlYWxmbG8ifQ.CUfpqPcSeSTJiOYzz72w8uFoCBrQOYK0NFdAUUVx3K3JVWLFIfogLmPjnJFMmsJq",
"role": "unknown"
}
Headers
The following headers are included in the request and the response:
Request headers
Accept: The response content type depends on the Accept header.
Authorization: The OAuth/JWT token to authenticate.
Response headers
Content-Type: application/json