How to unsubscribe the chatActivity?

Answered

7 Comments

  • Steven Lo
    Comment actions Permalink

    I found a API method stopAgentSession may help: 

    https://graphql-docs.com/docs/Mutation/?graphqlUrl=https://chat-api.zopim.com/graphql/request

    But, I fail to execute this method as (Syntax Error GraphQL request (1:10) Expected $, found)

    Detail Exception message:

    Source code:

     

     

     

     

    0
  • Steven Lo
    Comment actions Permalink

    Try different combination still not work

    0
  • Joey
    Comment actions Permalink

    Hi Steven-

    This error does indeed indicate that the session has reached its subscription limit. Currently, we have 10 subscriptions limit per session. It sounds like you are making subscription requests again after the disconnection, but this should not be needed. Upon reconnection (to the same WebSocket URL), all previous subscriptions should still be there.

    0
  • Joey
    Comment actions Permalink

    Additionally, to mitigate the default timeout (30 min), the WebSocket client can perform a regular ping to avoid inactivity. This can be done by sending

    {
      "sig": "PING",
      "payload": "any_payload"
    }


    the response will be an echo of the given payload:

    {
      "sig": "PONG",
      "payload": "any_payload"
    }
    0
  • Tony YU
    Comment actions Permalink

    It's really confused. What is exactly the correct way to call stopAgentSession?

     

    Try send in both HTTP and WebSokcet, both failed.

    0
  • Joey
    Comment actions Permalink

    Hi folks-

    I am changing the topic here to 'Chat Conversations API' for more visibility.

    Thanks,

    Joey

    0
  • Xinyu Zhao
    Comment actions Permalink

    Hi Steven,

     

    The mutation should be declared as below, without "()".  It should work.

    0

Post is closed for comments.

Powered by Zendesk