Message long polling notifies you of events that occur on the Chat server for your Chat
session.
The legacy chat product is scheduled for retirement on February 14, 2026, and is in
maintenance mode until then. During this phase, you can continue to use chat, but we no
longer recommend that you implement new chat channels. To avoid service interruptions to
your customers, migrate to Messaging for In-App and Web. Messaging offers many
of the chat features that you love plus asynchronous
conversations that can be picked back up at any time. Learn about chat retirement in Help.
When you start a request, all pending messages get immediately delivered to your session. If
there are no pending messages, the connection to the server will remain open. The Messages
poll will return one payload of messages from the server when they become available, and
you’ll have to open a new Messages connection to receive future data.
You’ll receive a 200 (“OK”) response code and a resource that contains an array
of the remaining messages. If no messages were received, you will receive a 204 (“No
Content”) response code.
When you receive a 200 (“OK”) or 204 (“No Content”) response
code, immediately perform another
Messages request to
continue to retrieve messages that are registered on the Chat server.
If
you don’t make another Messages request to
continue the messaging loop, your session will end after a system timeout on the Chat
server.
If you don’t receive a response within the number of seconds indicated by the
clientPollTimeout property in your SessionId request, your network connection to the server is likely experiencing an
error, so you should terminate the request.
To initiate a long polling loop, perform a Messages
request.