Need Guidance with creating code authorization client - Python SDK

Hi ,
My End goal is to download bulk audio calls, using python SDK.

For this, I created client with Grant Method as "Client Credentials".
But with this method I am getting error "Forbidden".
Got to understand , I need to create Oauth client with method as "code authorization".

Need help with how do I create this client and what should be "redirect url" while creating client and what scope I need to mention to fulfil my end goal?

Hello,

Client credentials should work if you have the required permissions. When creating a client with the Client Credentials OAuth method, assign a role granting permission to download bulk audio calls.

Best

Hello @Ebenezer_Osei , I do have assigned the role, which has permission for recordings api.

Even when I try to use the same api's, in developer tools , which is
"https://developer.genesys.cloud/developer-tools/#/api-explorer"

Those all API's works, but when I try to access api using the python SDK,

I get error 403 -- Forbidden

Which endpoint are you using?

Hi,

If you are trying to authorize with client credentials you will need to setup and OAuth Client and assign the role the required permissions. Take a look at the Client Credentials page for instructions on how to setup an OAuth Client. Then, take a look at the Python SDK documentation on how to authorize with client credentials. Alternatively, you can set the access token in the Python SDK like so:

# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'

Thanks,

Mike

Yes, I tried , it got fixed, It was missing required permissions.

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