Legacy Dev Forum Posts

 View Only

Sign Up

Can't get the token from get_client_credentials_token

  • 1.  Can't get the token from get_client_credentials_token

    Posted 06-05-2025 18:08

    JulianAlejandroVil | 2023-01-11 20:57:33 UTC | #1

    I am trying to connect to the API via Python according to this guide but I get a client not found error, I tried the following code and it does not work

    apiclient = PureCloudPlatformClientV2.apiclient.ApiClient().getclientcredentialstoken(os.environ['GENESYSCLOUDCLIENTID'], os.environ['GENESYSCLOUDCLIENTSECRET'])

    As we use the EU central server i thought of changing the host by inserting the url in the ApiClient() with login.mypurecloud.de but it didn't work either.

    Could you please provide any help regarding the error, Thanks in advance!


    tim.smith | 2023-01-11 21:08:53 UTC | #2

    The client not found error is typically caused by one of:


    Clayton_Curtis | 2023-01-20 00:32:25 UTC | #3

    had same issue today try this addition to your code: PureCloudPlatformClientV2.configuration.host = 'https://api.usw2.pure.cloud' then apiclient = PureCloudPlatformClientV2.api_client.ApiClient()


    system | 2023-02-20 00:32:54 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 17944