validateToolToken

View as MarkdownOpen in Claude

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

booleantrue if the token is valid and not expired.

Example

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