Retrieve all non-expired sessions for the user, including session metadata and interaction details when available. A logto-verification-id in header is required for checking sensitive session details. Each entry includes an isCurrent boolean: true for the entry whose OIDC session backs the calling access token, false for the others. Use this to mark the "This device" entry in session-management UIs and to avoid revoking the caller's own session. At most one entry is true per response. Zero entries are tagged when the calling access token has no matching session uid — for example, the caller has revoked its own session but the token has not yet expired, or the token was issued from a non-session-backed grant.
Responses
-
Return a list of non-expired sessions of the user. At most one entry has
isCurrent: trueper request. -
Bad Request
-
Permission denied, recent user authentication is required or the access token does not include the
sessionsscope to access session details. -
Permission denied, the application is a third-party application. Account API operations that require recent authentication only accept first-party applications.
-
Internal Server Error
curl \
--request GET 'https://[tenant_id].logto.app/api/my-account/sessions' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"sessions": [
{
"payload": {
"exp": 42.0,
"iat": 42.0,
"jti": "string",
"uid": "string",
"kind": "string",
"loginTs": 42.0,
"accountId": "string",
"authorizations": {
"additionalProperty1": {
"sid": "string",
"grantId": "string",
"persistsLogout": true
},
"additionalProperty2": {
"sid": "string",
"grantId": "string",
"persistsLogout": true
}
}
},
"lastSubmission": {
"interactionEvent": "SignIn",
"userId": "string",
"verificationRecords": [
{
"id": "string",
"type": "string",
"identifier": {
"type": "username",
"value": "string"
},
"verified": true
}
],
"signInContext": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"clientId": "string",
"accountId": "string",
"expiresAt": 42.0,
"isCurrent": true
}
]
}