One-time ticket for the stream
POST
/conversation/ws-ticket
const url = 'https://api.harperharbor.com/open/v1/conversation/ws-ticket';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://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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Ticket.
Media typeapplication/json
object
ticket
string
expiresIn
integer
Example
{ "expiresIn": 30}