Skip to content

One-time ticket for the stream

POST
/conversation/ws-ticket
curl --request POST \
--url https://api.harperharbor.com/open/v1/conversation/ws-ticket \
--header 'Authorization: Bearer <token>'

A browser cannot put Authorization on a WebSocket upgrade, so the stream authenticates in two steps. Buy a ticket here, then connect to ${WS_ORIGIN}/open/v1/conversation/ws?protocolVersion=2 and send { "type": "auth", "ticket": "<ticket>" } as the first frame. The ticket is single-use and expires in 30 seconds.

Ticket.

Media typeapplication/json
object
ticket
string
expiresIn
integer
Example
{
"expiresIn": 30
}