***

title: debugToken
slug: /reference/typescript/agents/configuration/session-manager/debug-token
description: Decode token components for debugging without validating the signature.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Decode token components for debugging without validating the signature. Useful
for inspecting token contents and checking expiration.

## **Parameters**

<ParamField path="token" type="string" required={true} toc={true}>
  The base64url-encoded token to decode.
</ParamField>

## **Returns**

`{ callId: string; functionName: string; expiry: number; nonce: string; signature: string; expired: boolean } | null`
\-- The decoded token fields and expiration status, or `null` if malformed.

## **Example**

```typescript {5}
import { SessionManager } from '@signalwire/sdk';

const sm = new SessionManager();
const token = sm.generateToken('get_weather', 'call-abc123');
const info = sm.debugToken(token);
if (info) {
  console.log('Function:', info.functionName);
  console.log('Expired:', info.expired);
}
```