latestOpenAPI 3.1.02026-08-2255221218.6 KB

7f8c81a5a990

auth

Create Session Token

Creates a short-lived session token that can be used to authenticate WebSocket connections. Session tokens are useful for client-side applications where you don't want to expose your API key.

post/auth/session_token

Headers

Authorizationstring required

Bearer authentication header of the form Bearer <PHONIC_API_KEY>. Manage your API keys here.

Request body

ttl_secondsinteger

Time-to-live for the session token in seconds.

conversation_idsstring[]

Restricts the token to these conversations. A restricted token can read only their live audio and transcript, and cannot open the STS WebSocket or create an STS session. Omit it and the token can read any live conversation in the org. Pass it whenever the token will reach an end user's browser.

Response

Success response

session_tokenstring required

The session token to use for authentication.

expires_atstring date-time required

When the session token expires.