Chat Plugin
Refer to our Chat Plugin overview document for more information.
The HTTP API adheres to standards laid out in the core API.
#
Authenticating web usersPOST /chatplugin.authenticate
The request returns an authentication token that needs to be included in the WebSocket connection handshake.
You can either pass the channel_id
for a new conversation or a resume_token
that was obtained in a previous conversation using the resume
endpoint.
Sample request
Sample response (New conversation)
Sample response (Resumed conversation)
#
Get a resume tokenPOST /chatplugin.resumeToken
You must set the token
obtained on the authorization
endpoint as an Authorization
header.
Sample response
You can also obtain a resume token on behalf of the user. To do so you need to
call this endpoint with the system API token set on the Authorization
header
and with the channel and conversation ID.
Sample request
#
Send messageYou must set the token
obtained on the authorization
endpoint as an Authorization
header.
POST /chatplugin.send
Sample request
Sample response
#
WebSocket APIConnection and standards are the same as for the WebSocket server API. The authorization token is obtained from the authentication endpoint.
The WebSocket connection endpoint is at /ws.chatplugin
.
#
Receive message/user/queue/message
Sample payload