Heena Karir
Heena Karir

Reputation: 61

Getting "consent_required" error while generating JWT access token even after consent is provided

I am working with DocuSign Sandbox to test the JWT authentication. I have setup everything that is mentioned in the DocuSign JWT document. I provided the user consent as well. But when I am trying to get the access token using postman I am still getting "Consent_required" error. Tried user consent URL multiple times but since I have already granted the permission the consent page doesn't show up. I am not understanding where exactly the issue is. Why even after giving "signature impersonation" consent I am still getting error. This is for individual consent.

Upvotes: 6

Views: 14116

Answers (3)

Kyle
Kyle

Reputation: 11

Wow I got stuck on this for the longest time and the error "consent required" is REALLY bad at saying what to do to fix it. For anyone getting stuck here

  1. Go to the Docusign Admin Console. Not the eSignature admin console! I didn't realize they were 2 different places for the longest time. Here's a link straight to the admin console (https://apps-d.docusign.com/admin)

  2. You MUST verify your domain (Click "Domains" on the left sidebar and follow the steps).

  3. Not only that, the domain you used to generate your USER_ID in the eSignature console MUST belong to one of the verified domains. This is super unclear, and the fact that they're 2 separate consoles makes this even harder to detect.

  4. Once all of that has been done, you can go to "Connected Apps" on the left sidebar and add your eSignature application. Give it the permissions "signature impersonation" or whatever you need.

Upvotes: 0

Ibo
Ibo

Reputation: 79

You can just call the following url in the browser and click accept. Do not forget to replace YOUR_INTEGRATION_KEY with your real integration key. You also need to add the redirect_url to your applicatoin (Apps and Keys -> Select you app -> edit -> add redirect url -> add "http://localhost/"

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=YOUR_INTEGRATION_KEY&redirect_uri=http://localhost/

For more details read step 1 here.

Upvotes: 4

Larry K
Larry K

Reputation: 49104

Update

See my article on granting consent.

Original

Items to check:

  • You can check to see if you have granted any consent by looking at the user's profile page.

    The profile page tells you that at least one consent scope was granted. But JWT Grant needs two scopes: signature and impersonation If you're receiving consent_required then one or both of the consents is missing.

    Best recommendation: re-do the consent process.

    When asking for consent, check that both scopes are requested. The consent agreement window from DocuSign must look like the following:

    image

  • Check that the right person has granted consent: when you use the JWT Grant flow, you must specify the guid of a DocuSign user. It is that user who must grant consent.

  • Check that you spelled impersonation correctly. (This mistake cost me an hour or more once.)

  • Check that you're consistently using demo.docusign.net and account-d.docusign.com (developer sandbox urls) or the production systems.

  • See this comment too.

Upvotes: 5

Related Questions