This page was last edited on February 1, 2016, at 18:40.
Comments or questions about this documentation? Contact us for support!
This section describes the chat portion of the Genesys Web API Server REST API and provides guidance for developers building chat-related client applications.
To assist developers, we provide a few Chat REST API Samples.
The chat service is stateless, so in order to know whether a chat interaction is active, we have a requirement to use long polling and do this with the GetMessages operation.
Once a chat session starts, your application must periodically refresh by sending a GetMessages request to keep the session alive.
The refresh frequency is dependent on your application. However, you can use the flex-disconnect-timeout configuration option in Chat Server to specify the maximum timeout between refresh requests.
This is a Chat-specific requirement.
The Web API Server Chat Service now includes status codes in the HTTP response. Here is a list of the codes and their meanings:
Status Code | chatEnded=true/false | Does the Chat Client Consider That The Session Has Ended? | Comment |
---|---|---|---|
Successful Outcomes | |||
0 | false | No | Everything is fine |
0 | true | Yes | The chat has ended; terminate the session |
Unsuccessful Outcomes | |||
1 | false | No | The request was unsuccessful; retry |
1 | true | N/A | This case isn't possible, as the request was unsuccessful and the last successful chatEnded flag is inherited |
2 | true or false | Yes | Unrecoverable error; terminate the session |