Kuhne_Martin | 2024-07-29 20:26:27 UTC | #1
We have a react app in which we onboarded purecloud-platform-client-v2 and we initially implemented loginImplicitGrant which has been working. Now we need to switch to auth code with PKCE and we are using the loginPKCEGrant call as per the sample in https://developer.genesys.cloud/devapps/sdk/javascript
Our telecom team created a new client for testing, and sent me a client ID and client secret. They created a client for "code authorization grant" I am using the client ID in the call. There is no argument to supply a client secret. This also makes sense, since we can't keep anything secret on the client. During authentication, the following error is observed
Fatal: Genesys auth failed: Error: [unauthorized_client] undefined
I am unsure how to proceed, would anyone be able to help?
tim.smith | 2024-07-29 20:26:04 UTC | #2
KuhneMartin, post:1, topic:27467
`Error: [unauthorizedclient]`
This means that the client isn't authorized. See here: https://help.mypurecloud.com/articles/authorize-an-oauth-client-2/
Also, please update your bookmarks. The Developer Center's address is https://developer.genesys.cloud.
Kuhne_Martin | 2024-07-30 16:22:24 UTC | #3
Thanks for the quick response. We verified the client is authorized.
tim.smith | 2024-07-31 13:19:37 UTC | #4
If you're sure the client is verified in the org you're logging in to per the documentation, please open a case with Genesys Cloud Care to investigate why it still believes the client to be unauthorized.
faisyou | 2024-08-08 07:42:31 UTC | #5
Did you manage to resolve this issue ? I also faced the same issue - I solved this by changing the Grant Type in OAuth Client configuration from Token Implicit Grant to Code Authorization Grant - didnt need to change anything in my client (apart from using the loginPKCEGrant function instead of loginImplicitGrant
system | 2024-09-07 07:43:10 UTC | #6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 27467