Skip to main content
Question

Cannot get access token from jwt signature

  • October 22, 2024
  • 1 reply
  • 96 views

Forum|alt.badge.img

I tried to follow these page to get the access token from JWT.

this is what i do

 

Could you guys help 
Thank you
 

 

1 reply

Ivan.Dinkov
Docusign Employee
Forum|alt.badge.img+4
  • Docusign Employee
  • 36 replies
  • October 23, 2024

Hi @fufufafa 

It looks like you are mixing JWT with Authorization Code Grant.

The link https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation signature click.manage click.send&client_id=xxxxxxxxxxxxxx&redirect_uri=http://localhost is used to get the authorization code not JWT_TOKEN_TO_BE_COPIED.
This is Step 1 of the ACG flow

With JWT, the above link is executed only once (the first time ever the user wants to use this application) to grant individual consent and not to get authorization code

To get JWT token, you need:

  1. Build assertion 
  2. Make cUrl request
     curl --location 'https://account-d.docusign.com/oauth/token' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer' \
    --data-urlencode 'assertion=YOUR_ASSERTION'

I hope this helps.