curl --request POST \
--url https://{tenant_id}.hanko.io/sessions/validate \
--header 'Content-Type: application/json' \
--data '{
"session_token": "<string>"
}'
{
"is_valid": true,
"expiration_time": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"claims": {
"subject": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"issued_at": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"audience": [
"<string>"
],
"issuer": "<string>",
"email": {
"address": "jsmith@example.com",
"is_primary": true,
"is_verified": true
},
"session_id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"
}
}
Validate a session using a session token in a request body.
curl --request POST \
--url https://{tenant_id}.hanko.io/sessions/validate \
--header 'Content-Type: application/json' \
--data '{
"session_token": "<string>"
}'
{
"is_valid": true,
"expiration_time": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"claims": {
"subject": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"issued_at": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"audience": [
"<string>"
],
"issuer": "<string>",
"email": {
"address": "jsmith@example.com",
"is_primary": true,
"is_verified": true
},
"session_id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"
}
}
Session validation response
The response is of type object
.
Was this page helpful?