Get a session​
Get a session and all its information like the time of the user or password verification
Path Parameters
sessionId string required
Query Parameters
sessionToken string
Responses
- 200
- 403
- 404
- default
OK
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
session object
{
"session": {
"id": "string",
"creationDate": "2024-04-08T09:12:35.821Z",
"changeDate": "2024-04-08T09:12:35.821Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-04-08T09:12:35.821Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"webAuthN": {
"verifiedAt": "2024-04-08T09:12:35.821Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"totp": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"otpSms": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"otpEmail": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-04-08T09:12:35.821Z"
}
}
Schema
Example (from schema)
Schema
session object
{
"session": {
"id": "string",
"creationDate": "2024-04-08T09:12:35.821Z",
"changeDate": "2024-04-08T09:12:35.821Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-04-08T09:12:35.821Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"webAuthN": {
"verifiedAt": "2024-04-08T09:12:35.821Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"totp": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"otpSms": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
},
"otpEmail": {
"verifiedAt": "2024-04-08T09:12:35.821Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-04-08T09:12:35.821Z"
}
}
Schema
Example (from schema)
Schema
session object
{
"session": {
"id": "string",
"creationDate": "2024-04-08T09:12:35.822Z",
"changeDate": "2024-04-08T09:12:35.822Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-04-08T09:12:35.822Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-04-08T09:12:35.822Z"
},
"webAuthN": {
"verifiedAt": "2024-04-08T09:12:35.822Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-04-08T09:12:35.822Z"
},
"totp": {
"verifiedAt": "2024-04-08T09:12:35.822Z"
},
"otpSms": {
"verifiedAt": "2024-04-08T09:12:35.822Z"
},
"otpEmail": {
"verifiedAt": "2024-04-08T09:12:35.822Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-04-08T09:12:35.822Z"
}
}
Returned when the user does not have permission to access the resource.
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
GET /v2beta/sessions/:sessionId
Authorization
name: OAuth2type: oauth2scopes:openid,urn:zitadel:iam:org:project:id:zitadel:aud
flows: { "authorizationCode": { "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize", "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token", "scopes": { "openid": "openid", "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud" } } }
Request
Request
curl / cURL
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
python / requests
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
go / native
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
nodejs / axios
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ruby / Net::HTTP
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
csharp / RestSharp
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
php / cURL
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
java / OkHttp
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
powershell / RestMethod
curl -L -X GET 'https://$CUSTOM-DOMAIN/v2beta/sessions/:sessionId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'