Skip to content

Check a token with Bage (RFC 7662)

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

An alternative to checking tokens yourself. Returns active false for a bad, expired or revoked token. It doesn’t check the request signature.

Media typeapplication/json
object
token
required

The agent token from the agent-token header.

string

Example generated

{
"token": "example"
}

The answer, with the token’s claims when it’s active.

Media typeapplication/json
One of:
object
active
required
boolean

Example

{
"active": true,
"iss": "https://api.trybage.com",
"aud": "https://shop.example",
"sub": "usr_5b1c9e",
"name": "Alex Morgan",
"email_verified": true,
"act": {
"sub": "agt_7a3d1f",
"name": "Scout",
"operator": "Northwind Labs",
"act": {
"sub": "agt_9k2m4p",
"name": "Kernel"
}
},
"scope": "browse cart",
"test": true,
"jti": "tok_8d2e4f"
}