Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  CloudCX LOGOUT API

    Posted 10-09-2025 00:57
    Hi,
    We are working on a custom service with a feature to logoff users and release their license that was checked out during login.
     
    From the Performance > Agent Status page, we could see a "logoff" option on the CloudCX UI which in the background invokes the logout API mentioned below.
     
    curl --request DELETE \
    --header 'authorization: Bearer ***********'
     
    As a result of this API invocation, we could see that the agent is logged out and moved to Offline state.
    Can we use this API at all ? as it is not documented in API Explorer.
    If not, kindly suggest how the logout functionality can be handled.

    #PlatformAPI

    ------------------------------
    Thanks.
    ------------------------------


  • 2.  RE: CloudCX LOGOUT API

    Posted 10-10-2025 22:51

    Hi, 

    From my tests, that endpoint seems to be part of the backend and not a public API. Since it's not listed in the API Explorer, I'd assume it's not officially supported and could change without notice.

    What worked for me was using the documented endpoint that revokes user tokens and forces a disconnect:
    DELETE /api/v2/tokens/{userId}

    If the user is in a browser session, you can also try redirecting to:
    https://login.<region>/logout

    I'd also suggest checking whether the automatic inactivity timeout meets your needs for handling idle logouts.



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



  • 3.  RE: CloudCX LOGOUT API

    Posted 9 days ago

    We have the automatic inactivity timeout configured, but can't get it to reliably log users out. Every once in a while, it does. It usually just logs them right back in, though. Based on what I've seen others say, this is likely due to using single sign-on. I was just out doing some light reading on the Authorization Overview page when I saw this:

    In the Idle Token Timeout section, it says "Organizations may configure idle token timeout, in which case, tokens will be expired after a specified period of inactivity."

    In the Access Tokens section, it says "If an application token is expired or invalid the API will return the HTTP status code 401. That signals the application to initiate the OAuth flow to get a new access token."

    Is that saying that the application is just going to ask for a new token when the current one expires instead of logging the user out like we want it to? That's what ours seems to be doing. If Genesys Cloud asks our SSO server if the agent should be logged in or not, the SSO server is going to say yes.



    ------------------------------
    Dave Halderman
    Business Analyst
    ------------------------------