mySessions
Requires an authenticated session.
Lists the signed-in user's sessions with device, browser, location and last activity, and marks the current one.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query MySessions {
mySessions {
id
createdAt
browser
device
ipAddress
isActive
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MySessions {\n mySessions {\n id\n createdAt\n browser\n device\n ipAddress\n isActive\n }\n}"
}
EOF
Response:
{
"data": {
"mySessions": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"browser": "string",
"device": "string",
"ipAddress": "string",
"isActive": true
}
]
}
}
mySessions: [SessionInfo!]!
Type
SessionInfo object
A session of the signed-in user.