New Websocket
GET {{baseUrl}}/1/websockets/new
Returns a websocket URL to connect to. The URL may expire if no connection is initiated within 60 seconds.
Websocket Events:
Each event sent through the websocket is a JSON object with a type indicating what happened.
type - What type of event this packet represents. The list of
types include the following:
message- A new message was sent, includes message, user, and thread.heartbeat- Periodically sent to keep the connection open.alive- Reply sent if the client sends {type
:heartbeat
}.error- Sent in response to any unrecognized command, includes debug.
message - A Quip message in the format described in
Get Recent Messages.
user - An object containing the ID and name of the user who sent
the message.
thread - An object containing the ID and title (if any) of the
thread the message was sent on.
debug - A string with additional debug information.
Example Websocket Events:
{
"type": "heartbeat"
}
{
"type": "alive"
}
{
"type": "error",
"debug": "Unsupported command."
}
RESPONSES
status: OK
{"url":"wss://listen0.quip.com:443/platform/listen/0?t=1","user_id":"KaDAEAinU0V"}