coder_bro
coder_bro

Reputation: 10773

Docusign - sandbox - Redirect URI - not working

I am trying out Docusign sandbox environment in which I have created an integrator key with appropriate redirect uri

When I request the api: https://admindemo.docusign.com/oauth/auth?response_type=id_token&scope=open_id&client_id=<integrator-key>&state=custom&redirect_uri=https://webhook.site/1b7aba4c-f96f-41e1-922d-2d8d38392208&admin_consent_scope=impersonation

Docusign does not redirect to the redirect-url, but opens the Docusign admin page.

If I request the URL: https://account-d.docusign.com/oauth/auth?response_type=id_token&scope=open_id&client_id=<integrator-key>&state=custom&redirect_uri=https://webhook.site/1b7aba4c-f96f-41e1-922d-2d8d38392208&admin_consent_scope=impersonation

Then I get the error:

You are not an organization admin. Please contact your DocuSign Administrator

Upvotes: 1

Views: 1407

Answers (2)

Drew
Drew

Reputation: 5029

response_type=id_token is invalid. The response type should be code. Unfortunately, the 'Obtaining Consent' documentation still references this incorrect value.

scope=open_id can only be used if your account is associated with an Organization, and if you are an Organization Administrator. If your account is not under an Organization, you'll need to use the individual consent workflow, which means scope should be signature impersonation and the admin_consent_scope parameter should be removed.

If you would like to create an Organization in the sandbox environment, you will need to open a case with DocuSign Support requesting that functionality be added to your Demo account. To have that enabled in Production, you'll need to contact your Account Manager or the Sales team.

Upvotes: 2

Larry K
Larry K

Reputation: 49104

Your question is not so clear -- please update your question if this answer is in the wrong direction.

I think you are trying to implement the oauth authorization code grant flow and are having a problem.

The starting url for DocuSign for the oauth auth code grant flow:

Also, why are you including the admin_consent_scope query parameter?

Hopefully this answer regarding the correct url will help. If so, then ask a NEW question if you run into any future issues.

Developer documentation

Upvotes: 0

Related Questions