6

i am running the DOCUSIGN example code "eg-03-node-auth-code-grant" to check how embedded signing works(at https://localhost:5000). So after the signing is complete i would want it to return to another app. I have my other app running at localhost:8080. In the Docusign developer sandbox account, i have added "https://localhost:8080/ds/callback" in the list of redirect URLs. When i test the embedded signing code now, it gives me an error saying "Redirect URI is not registered properly with docusign"

What I ideally want is to build a separate docusign app for a consent process. once the consent is done, it goes to my other application to complete the rest of the study. For now, i was testing out with the example code it it redirects to another app but it doesnt. Am I missing something? other than registering the redirect URI in the integration key page, is there any change i need to make in the demo code for embedded signing to make it work?

Ann
  • 186
  • 4
  • 15
  • Hi, you also need to add a redirect URI for each scenario as in: https://localhost:8080/ds/callback, https://localhost:8080/ds/callback#/username, https://localhost:8080/ds/callback#/password – mapussah Oct 16 '19 at 20:20

7 Answers7

4

As said in support : "There are two primary causes of this error, either an incorrect URI is being passed to DocuSign, or a correct URI has not been registered for the integration key."

I had the same problem, so i realized that appUrl was http://localhost:8080/ds/callback, but should be http:localhost:8080. So you have to add too a Redirect URI of http://localhost:8080/ds/callback to your Integration Key in your eSignature Admin.

I hope i was clear and sorry for my bad english.

Dr.G
  • 448
  • 6
  • 19
2

It's possible you're using incorrect environment, use account-d.docusign.com for Demo and account.docusign.com for Production when requesting for authorization code grant.

Kestutis
  • 600
  • 5
  • 13
1

could this be https vs. http situation? are you running it on your local at https://localhost:8080/ds/callback or http://localhost:8080/ds/callback? please check. It has to match exactly the same

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • the other app runs at http://localhost:8080/#/ so should the redirect URI be http://localhost:8080/#/ds/callback or just http://localhost:8080/#/? the error persists in both ways though. – Ann Oct 01 '19 at 19:37
  • the redirect doesn't work now when i change the URI back to http://localhost:5000/ds/callback either. isn't this strange? – Ann Oct 01 '19 at 20:21
  • you cannot use the # character – Inbar Gazit Oct 01 '19 at 21:09
  • i removed the #. – Ann Oct 01 '19 at 21:40
  • it doesn't redirect to anything other than the URI for docusign. i.e. localhost:5000/ds/callback. please can you let me know how i can make it work to redirect to any other uri? – Ann Oct 01 '19 at 21:43
  • not sure what you mean. the redirect would happen AFTER you log in. So you will see docusign first, you need to login with user/password, and if that worked ok - you'll then be redirected back to the url you specified. – Inbar Gazit Oct 01 '19 at 22:22
  • the error message "The redirect URI is not registered properly with DocuSign" appears on the login page!! – Ann Oct 01 '19 at 22:37
  • Ann, this means that you don't have the exact same URI set in the DocuSign admin. Please email me at inbar.gazit@docusign.com if you still can't figure it out and I'll try to help you. – Inbar Gazit Oct 02 '19 at 00:11
1

Another thing to check is the use of trailing slashes in app_url. While my case related to the PHP Quickstart, it's possible this affects the others as well.

My Quickstart application was installed to a subdirectory, at https://example.com/docusign/public/. So the redirect URI was set in the DocuSign dashboard as https://example.com/docusign/public/index.php?page=ds_callback - which is correct but I was still getting the "not registered properly" error.

It turns out that the app_url in /docusign/ds_config.php must not have a trailing slash, so

    'app_url' => 'https://example.com/docusign/public', // The url of the application.

works but

    'app_url' => 'https://example.com/docusign/public/', // The url of the application.

fails with this error.

Rolf Kaiser
  • 551
  • 6
  • 9
0

You just need to add http://localhost:8080/login like the redirect URI in Docusign and you won't see the error message "The redirect URI is not registered properly with DocuSign" again. It's working for me.

  • this doesn't work either for me. just to remind, the docusign app runs on http://localhost:5000 and the app i want it to redirect to after signing is complete is on http://localhost:8080 Is it working for you when you run it this way as two separate apps? – Ann Oct 02 '19 at 13:45
0

you also need to add a redirect URI for each scenario as in: https://localhost:8080/ds/callback, https://localhost:8080/ds/callback#/username, https://localhost:8080/ds/callback#/password

Make sure the protocols are also the same

mapussah
  • 109
  • 1
  • 9
0

In ds_config.php there is a comment under app_url saying

// Ie, the user enters  app_url in their browser to bring up the app's home page
// Eg http://localhost/code-examples-php/public (no trailing slash) if the app is installed in a
// development directory that is accessible via web server.
// NOTE => You must add a Redirect URI of app_url/index.php?page=ds_callback to your Integration Key.

So try adding this to your Integration Key -> Redirect URI, In my case I'm using port 8080.

http://localhost:8080/public/index.php?page=ds_callback

This works for me.