Reputation: 119
I have been following the DocuSign documentation to have a user "grant consent" for an application to user a DocuSign user account. I got that working. Now I am trying to make some adjustments to the url that sends a user to DocuSign, and then redirects the user back to my application.
This works for me right now: https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack
What is want to do: https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack?variableName=ABC123 (Where 'ABC123' is dynamic)
In short - I want to pass a dynamic value in the redirect URL so that when I get the callback, I still have the value. My problem: When try to pass the variable, it doesn't work. DocuSign complains that the Redirect URL isn't configured - so I adjusted the DocuSign Redirect URL for that client to include the '?variableName=' on the end - I got the same error.
My Question: Can I pass a dynamic value to DocuSign in the redirect_uri, and get that value back when I receive the callback? How can I adjust the configuration at DocuSign to allow a variable in the URL?
Upvotes: 0
Views: 701
Reputation: 6818
You cannot pass dynamic variable
in redirect_uri, it should exactly match what has been configured in your IntegratorKey. To pass anything dynamic, you can use state
parameter, whatever value you will set in state
while calling DocuSign URL, DocuSign will pass exactly same value in the response after authenticating the user in the response. The Request URL may look like below:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack&state=variableName_ABC123
Treat this state
parameter for the dynamic variable.
Upvotes: 5