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)
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64cursor_pagination object
Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.
limit integernext_cursor stringOpaque token addressing the next page. Absent on the last page.
prev_cursor stringOpaque token addressing the previous page. Absent on the first page.
last_cursor stringOpaque token addressing the final page directly, so a client can jump to the end without a total count.
total_count int64Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.
errors 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
},
"cursor_pagination": {
"limit": 0,
"next_cursor": "string",
"prev_cursor": "string",
"last_cursor": "string",
"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"
}
}