Can't get the token from get_client_credentials_token

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.api_client.ApiClient().get_client_credentials_token(os.environ['GENESYS_CLOUD_CLIENT_ID'], os.environ['GENESYS_CLOUD_CLIENT_SECRET'])

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!

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

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

1 Like

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