Scripts component - We did not recognize your redirect url

Hi

I have a script component which contains a web page with the url points to a page serves by my server. The page on my server using Implicit Grant to authorize with PureCloud.

This script is displayed when the call is connected.

It works fine under my ".com" org. Screenshot1 in the comment (cos i'm a new user, i can only attach one image in my topic)

But when we do the same for ".ie" org, we've got
" Sorry, PureCloud cannot authenticate you at this time.

We did not recognize your redirect url."
screenshot2 in the comment:

I'm certain that the URL uses in the web page element of the script is the same as redirected url listed in OAuth's client configurations. Screenshot below:

What I don't understand is why the same steps to create the script and same code used in ".com" org can't be used for ".ie" org. Screenshot3 in the comment.

Is it because ".com" org was created 2 years ago? Is there any new steps for this kind of integration added that we're not aware of?

Many thanks
Mintra

1 Like

Screenshot1: all working fine under ".com" org
image

Screenshot2: not working for ".ie" org

Screenshot3: Same code for ".com" and ".ie" orgs, except the parameter passed into "setEnvironment" function.

1 Like

This means the redirect URL you're sending with the request doesn't match the redirect URL configured on the OAuth client you're using. It must match exactly, character for character. Even a trailing slash makes it different.

1 Like

We copied the url of the webpage from Script configuration and pasted into the redirect url field of OAuth configuration.

There's nothing else I can think of that will make them different. Hidden spaces?

I don't have access to your org's configuration or know what you're sending for the redirect URL. If you've added logging to your application to confirm that it is sending a redirect URL that is literally an exact character-for-character match with what you have configured, please open a case with Genesys Cloud Care to investigate.

Thanks, Tim.

I will open a case with them.

Update:

I now know why it's not working.

My web page URL in Script component has too many parameters.
https://www.mytest.com?param1=a&param2=b&param3=c

For the current version of Purecloud Javascript SDK, the redirect URL can only have a maximum of 1 parameter. This will also have to match the config in your OAuth > RedirectURL.

For example, these urls will work:
h t t p s : / / www.mytest.com?param1=a
h t t p s : / / www.mytest . com

You still can have more than one parameters in the URL of your script components or widget component, but for Implicit Grant initiation and OAuth's RedirectURL config you can only have one parameter max.

Hopefully, there's a fix released soon.

This issue is being tracked as API-5248 and is currently being worked on. Keep an eye on the JS SDK releases for the fix. If you still have a case open with Care about this, it can be closed.

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