getSessionMetadata

View as MarkdownOpen in Claude

Retrieve metadata associated with a session.

Parameters

sessionId
stringRequired

The session identifier.

Returns

Record<string, unknown> | undefined — The metadata record, or undefined if no metadata exists for this session.

Example

1import { SessionManager } from '@signalwire/sdk';
2
3const sm = new SessionManager();
4sm.setSessionMetadata('session-1', { caller: 'John', topic: 'billing' });
5
6const meta = sm.getSessionMetadata('session-1');
7console.log(meta); // { caller: "John", topic: "billing" }