Create a Website text session token
Historical v1 endpoint for creating a short-lived Website text session token.
On this page
This historical endpoint accepted Website integration credentials through HTTP Basic authentication and created a token for the text channel. Use the current v2 session-grant contract for new integrations.
Contract source
Generated from content/docs/sources/openapi/website-session-grants/v1.openapi.yaml.
Download the OpenAPI specification
POST /channels-text/public/session-tokens
Create a short-lived token for a Website text WebSocket connection.
Authentication
Send the Website integration client ID and client secret using HTTP Basic authentication.
cURL example
curl --request POST \
--url https://your-dedicated-domain.example/channels-text/public/session-tokens \
--user "$TALKIT_CLIENT_ID:$TALKIT_CLIENT_SECRET"
Request body
This operation has no request body.
Responses
| Status | Description |
|---|---|
200 | The text session token was created. |
401 | The HTTP Basic credentials are missing or invalid. |
403 | The Website integration or linked text agent is unavailable. |
404 | The Website integration or linked resource does not exist. |
500 | TalkIt could not create the token. |
Response example
{
"success": true,
"data": {
"sessionToken": "short-lived-one-use-token",
"websocketUrl": "wss://your-dedicated-domain.example/channels-text/public/_ws",
"expiresAt": "2026-08-03T12:00:00.000Z"
}
}
Schemas
WebsiteTextSessionToken
| Field | Type | Required | Description |
|---|---|---|---|
sessionToken | string | Yes | Short-lived token for one text WebSocket connection. |
websocketUrl | string (uri) | Yes | WebSocket URL for the public text channel. |
expiresAt | string (date-time) | Yes | ISO 8601 expiration time for the token. |
SuccessEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
success | true | Yes | Indicates that the request succeeded. |
data | WebsiteTextSessionToken | Yes | The newly issued text session token. |