I been trying to execute the
/api/v2/outbound/dnclists/{dncListId}/phonenumbers API via Python using the client credential OAUTH but I keep getting these unauthorized exception. I have all the admin and developer roles assigned to my client. Is there something I'm missing?
Exception when calling OutboundApi->post_outbound_dnclist_phonenumbers: (401)
The error is indicating that you're not sending an auth token, not that it's valid and lacking permissions. Be sure to look through your code and make sure you're initializing things properly and are setting the access token correctly before making requests.
I been assigning the client_id and client_secret (variables I used) with the one I get from my Oauth. Odd I doubled checked and even used a new one and still getting me the same error. Could it be the code I'm using to pass them in. Said "invalid client" and "client not found"
I think I figured out why its happening I basically gave the OutboundApi() instance the token I got from my API; Thou now I'm getting permission errors. Is this still related to the roles assigned? I checked and I have all the permission for adding outbound dnc selected including all the admin accounts.
Is there a section we need to enable on the code side to assign that missing permission? Or is it because it doesn't like using client credential Oauth
"message":"Unable to perform the requested action. You must have at least one of the following permissions assigned: [outbound:dnc:add]
Keep in mind that you, as a user, are not client credentials. The "you" in this error message is referring to the OAuth client. Your user account may have permission to do things and it will work when you're signed in to API Explorer as your user, but the client credentials you've created have their own permissions that are granted to it based on the roles configured for the client. About people and permissions - Genesys Cloud Resource Center
It requires the permission stated in the error message. Once you've granted that permission to a role assigned to the oauth client, wait 10 mins just to rule out any caching issue. Then run the app again to get a new token and see if it works. If you continue to get the 403 and are sure your configuration is correct, please open a case with Genesys Cloud Care to investigate further.
So for now we are not using OAuth and we have temporary solution with AWS secrets manager /AWS Lambda , In our request from genesys we need to enter URL and headers (Key and Token).
Moving forward once AWS design is implemented we will use Ouath.
That's not an option. Genesys Cloud API authorization is exclusively OAuth. If you don't implement one of the supported OAuth flows, you can't get an auth token, and you can't make API requests.
You can make requests to the Platform API directly from your browser using API Explorer: https://developer.genesys.cloud/devapps/api-explorer. There is a page about postman if you need to use that instead though.
I am working on a solution Genesys --> AWS API Gateway ---> CRM(SAP), I need to understand flow using Oauth Authentication with Grant type Client Credentials. Pls share any details on this design and how a token is generated in Genesys or Postman.