Issue a one-time WebSocket auth token
POST
/api/canvas/{deal_id}/ws-token
const url = 'https://example.com/api/canvas/example/ws-token';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/canvas/example/ws-token \ --header 'Authorization: Bearer <token>'Exchanges a valid JWT for a short-lived (60s) one-time token suitable for use in the WebSocket URL query string. The token is consumed on first use and cannot be reused.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”deal_id
required
Deal Id
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WsTokenResponse
Short-lived token for WebSocket authentication.
object
ws_token
required
Ws Token
string
expires_in_seconds
required
Expires In Seconds
integer
Examplegenerated
{ "ws_token": "example", "expires_in_seconds": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}