Get session info
Get user and session information for a given session handle
GET
/appid-{appId}/recipe/sessionAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Query parameters
sessionHandlehandleHeader parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Responses
200Get user and session information for a given session handle
One of:
object
statusstatusOKAllowed:
OKuserDataInDatabaseuserDataInDatabaseshould be a JSON object (not a JSON literal nor an array)
userDataInJWTuserDataInJWTshould be a JSON object (not a JSON literal nor an array)
userIduserIdexpiryexpirytimeCreatedtimeCreatedsessionHandlehandletenantIdtenantIdunauthorisedMessageResponse
statusunauthorisedResponseAllowed:
UNAUTHORISEDmessagemessage400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Request
curl -X GET "/appid-{appId}/recipe/session" \
-H "api-key: YOUR_API_KEY"const response = await fetch("/appid-{appId}/recipe/session", {
method: "GET",
headers: {
"api-key": "YOUR_API_KEY"
}
});import requests
response = requests.get(
"/appid-{appId}/recipe/session",
headers={
"api-key": "YOUR_API_KEY"
},
)Response
{
"status": "OK",
"userDataInDatabase": {
"test": 123
},
"userDataInJWT": {
"test": 123
},
"userId": "fa7a0841-b533-4478-95533-0fde890c3483",
"expiry": 1637262633029,
"timeCreated": 1637262633029,
"sessionHandle": "68en6gd6-865b-4af6-ba00-96e5c153257d",
"tenantId": "customer1"
}"string""Invalid API key""Not Found""Internal Error"