Examine and introspect an access token locally. All standard and custom claims will be returned. No network calls are made when invoking this API method.
An error will be thrown if the token is not active.
This method supports only access tokens.
Examine and introspect an access token locally. All standard and custom claims will be returned. No network calls are made when invoking this API method.
An error will be thrown if the token is not active.
This method supports only access tokens.
const stytch = require('stytch');
const client = new stytch.Client({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
token: 'eyJ...',
};
const options = {};
client.idp.introspectTokenLocal(params, options)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
{
"subject": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
"scope": "openid email profile",
"audience": ["PROJECT_ID"],
"client_id": "connected-app-test-d731954d-dab3-4a2b-bdee-07f3ad1be888",
"expires_at": 1738848103,
"issued_at": 1738844503,
"issuer": "stytch.com/PROJECT_ID",
"token_type": "access_token"
}