TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Report whether a token is active

POSThttps://api.testingapis.com/api/auth/oauth/introspectSign in to see this endpoint's URL

Report whether a token is active (RFC 7662).

Body (form or JSON): token. Unknown, expired and revoked tokens return {"active": false}.

Request body

Optional. application/x-www-form-urlencoded. Token to inspect.

Example body
token={{oauthAccessToken}}

Responses

200
Token status and, when active, its scope, client, subject and expiry.

Example

Request
curl -X POST "https://api.testingapis.com/api/auth/oauth/introspect" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Authorization: Basic YXBpYmVlLWNsaWVudDphcGliZWUtc2VjcmV0" \
  --data-urlencode "token={{oauthAccessToken}}" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "active": true,
  "scope": "read profile",
  "client_id": "apibee-client",
  "username": "apibee",
  "sub": "apibee",
  "token_type": "Bearer",
  "iat": 1790792795,
  "exp": 1790796395
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.