GetMessages
This operation is part of the Customer Chat API portion of the Web Services API.
Overview
Send this request periodically to retrieve new chat messages.
By specifying the index parameter, previous messages can be recovered (for example: index=0 will return all messages).
Important
As with all customer chat API requests, no Authorization header should be included. Instead, the ContactCenterId custom HTTP header should be included.Request URL | /api/v2/chats/{id} |
---|---|
HTTP Method | POST |
Required Features | - |
Required HTTP Headers | ContactCenterId |
Parameters
Parameter | Value |
---|---|
index | An optional URL parameter used to specify the index of the first entry to return. If not specified, Web Services returns messages that the client has not received yet. |
Example
Request
GET .../api/v2/chats/652492d9-c2d9-44c9-b9ad-0ab7984114bb/messages ContactCenterId: cfe5ad67-ba6d-4340-81f9-bb680ef5d498
Response
{ "messages":[ { "from":{ "nickname":"Chris", "participantId":"1", "type":"Customer" }, "index":1, "type":"ParticipantJoined" }, { "from":{ "nickname":"Chris", "participantId":"1", "type":"Customer" }, "index":2, "text":"Hello?", "type":"Text" }, { "from":{ "nickname":"Kristi Sippola", "participantId":"2", "type":"Agent" }, "index":3, "type":"ParticipantJoined" } ], "statusCode":0 }
Parameter | Description |
---|---|
from | An element contain data about a chat participant. |
index | Denotes the order of the chat activity, with 1 being the first message. |
text | The chat participant's message. |
type | The type of chat notification. Current possible values are:
|
This page was last edited on January 22, 2016, at 19:56.
Comments or questions about this documentation? Contact us for support!