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.

Authentication

AuthorizationBearer
Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).

Request

This endpoint expects an object.
ttl_secondsintegerOptional60-3600Defaults to 300

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

Response

Success response
session_tokenstring
The session token to use for authentication.
expires_atstringformat: "date-time"
When the session token expires.

Errors