Verify & decode an access token
Verify a that a user's client access token is valid.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
Body
Required
The user's client access token. The access token represents a logged in application user. This is not the same as the
access_token
that you use to work with the Admin API.
POST
/groups/{groupId}/apps/{appId}/users/verify_token
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/users/verify_token' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"token":"string"}'
Request examples
{
"token": "string"
}
Response examples (200)
String-1
token expired
{
"sub": "string",
"aud": "string",
"exp": 42,
"iat": 42,
"iss": "string",
"custom_user_data": {},
"domain_id": "string",
"data": "string",
"device_id": "string"
}
Response examples (400)
{
"error": "string",
"error_code": "string"
}
Response examples (401)
{
"error": "invalid session",
"error_code": "InvalidSession"
}