rmoreira | 2021-10-14 13:14:42 UTC | #1
Hello,
We are making a client app where code is located in github. In javascript code, we are trying to use SDK api to get token using :
const client = platformClient.ApiClient.instance; client.loginImplicitGrant(clientId, redirectUri, { state: state }) .then((data) => { console.log(data); // Do authenticated things }) .catch((err) => { // Handle failure response console.log(err); });
But we have struggling to put the 'redirectUri' to make the loggin and return. We tryed to put the genesys url or git site url, and anything works....
Could anyone help us?
Regards!
Ebenezer_Osei | 2021-10-14 13:29:44 UTC | #2
Did you add your redirect url to your authorized URLs? Check out the link below to find out more: https://developer.genesys.cloud/api/rest/authorization/use-implicit-grant#get-the-oauth-client-information
rmoreira | 2021-10-14 15:06:52 UTC | #3
Hello!
Yes, we configure this OAuth pointing where the github site is located (Attached)
Regards!
rmoreira | 2021-10-14 15:08:10 UTC | #4
Hello!
For more information about our case, this is what happend when we execute the code:
"Genesys Cloud cannot authenticate you at this time. We did not recognize your redirect URL. Please try again and notify your system administrator if the problem persists."
Regards!
tim.smith | 2021-10-14 15:18:54 UTC | #5
You must put in exactly the address configured as the redirect URI. If even one character is different, the redirect URI won't match and you'll get that error. Even including a trailing slash in one place and not the other is enough to cause it to fail.
rmoreira | 2021-10-18 09:05:35 UTC | #6
It Works!
Thank you!!
system | 2021-11-18 09:05:58 UTC | #7
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: 12362