Validate a user token
This endpoint validates a SlashID user token. The response indicates whether the token is valid and its expiration time if so. If the token is not valid, the reason is returned.
Header Parameters
- SlashID-SdkVersion string
Optional SDK version
Example: 1.4.1
- application/json
Request Body required
- token string required
A JWT token. Can be either a User token (
UserTokenText
) or a Token Container (TokenContainerText
)
Responses
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64errors object[]
httpcode integermessage stringresult object
valid booleanTrue if token is genuine and has not expired yet, false otherwise.
invalidity_reason stringPossible values: [
invalid_token_content
,expired
,invalid_issuer
,not_enough_factors
,person_not_active
]If the token is invalid, this field contains the reason.
expires_in_seconds integerJWT token validity. This value is not present if the token is not valid (valid field == false).
expires_at date-timeToken expiration time in UTC. This value is not present if token is not valid (valid field == false) or expired.
{
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total_count": 0
}
},
"errors": [
{
"httpcode": 0,
"message": "string"
}
],
"result": {
"valid": true,
"invalidity_reason": "invalid_token_content",
"expires_in_seconds": 0,
"expires_at": "2005-12-24T18:29:30.033157Z"
}
}