Skip to content

Introspect Token

POST
/api/v1/introspect
curl --request POST \
--url https://api.spartanauth.com/api/v1/introspect \
--header 'Content-Type: application/json' \
--data '{ "token": "example" }'

Validates a SpartanAuth access token and returns its subject, username, sector, admin flag, and expiry claims. This endpoint is typically used by backend services that need to inspect token contents.

Media type application/json
object
token
string
Example generated
{
"token": "example"
}

A successful response.

Media type application/json
object
sub
string
username
string
sectorID
string
isAdmin
boolean
exp
string format: int64
iat
string format: int64
Example generated
{
"sub": "example",
"username": "example",
"sectorID": "example",
"isAdmin": true,
"exp": "example",
"iat": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}