Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Regarding the behavior of WebSocket heartbeats

    Posted 10-17-2025 05:12

    We use a custom agent UI application built with the .NET SDK:
    https://mypurecloud.github.io/platform-client-sdk-dotnet/
    After establishing the notification channel, the client PC receives a WebSocket heartbeat every 30 seconds.
    Could you explain the behavior when the 1001 idle timeout occurs on the Genesys Cloud server and the WebSocket connection is closed?
    Q1.Does the connection idle timeout occur because of the heartbeat sent from Genesys Cloud?
    Q2.After Genesys Cloud sends a heartbeat, how many seconds later does the timeout occur?
    Q3.Is there a timeout setting or retransmission for heartbeats sent from Genesys Cloud?
    Q4.Where in Genesys Cloud is this error detected?


    #PlatformSDK

    ------------------------------
    Takayuki Suzuki
    NA
    ------------------------------


  • 2.  RE: Regarding the behavior of WebSocket heartbeats

    Posted 10-18-2025 13:16

    HI @Takayuki Suzuki

    According to the official Genesys Cloud documentation, a notification channel may close with idle timeout after 24 hours of inactivity, if the auth token expires, or if the 20-channel limit is exceeded. Heartbeats every 30 s do not prevent this. If you do not receive this response from Genesys Cloud, then close the WebSocket connection and reconnect to the notification channel. Sometimes the notification service closes WebSockets for maintenance; it sends a warning event, and clients have about 1 minute to reconnect before the server closes the old connection. If you do not receive a heartbeat or pong, close and reconnect the WebSocket.

    This behavior is described in the official documentation. I haven't found any additional public details beyond that, but sharing this here may help if anyone has observed different behavior in practice.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: Regarding the behavior of WebSocket heartbeats

    Posted 29 days ago

    Hi Luiz Rosa,

    Thank you for your response.
    Could you please explain why it is not possible to prevent this with a heartbeat every 30 seconds?
    The notification channel was closed in about 15 minutes.

    Thanks!

    Takayuki Suzuki



    ------------------------------
    Takayuki Suzuki
    NA
    ------------------------------



  • 4.  RE: Regarding the behavior of WebSocket heartbeats

    Posted 29 days ago
    Edited by Luiz Rosa 29 days ago
     
    In my tests I couldn’t reproduce this behavior. The heartbeat every 30 seconds doesn’t seem to prevent the channel from closing, since the idle timeout appears to be managed on the server side. If it’s closing after about 15 minutes, it might be related to a token or network condition, but that would need further checking. You could consider opening a support case with Genesys to confirm the expected behavior.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------