Skip to navigation

Alias for validateToken with reordered parameters (function name first, then token, then call ID).

Parameters

functionName
stringRequired

The expected function name.

token
stringRequired

The base64url-encoded token to validate.

callId
stringRequired

The expected call ID.

Returns

boolean — true if the token is valid and not expired.

Example

import { SessionManager } from '@signalwire/sdk';
const sm = new SessionManager();
const token = sm.generateToken('get_weather', 'call-abc123');
const valid = sm.validateToolToken('get_weather', token, 'call-abc123');
console.log('Valid:', valid); // true