Skip to main content

DocuSign: Generate Token

Authcode Get Token

Generate Refresh Token

  1. Go to https://admindemo.docusign.com/apps-and-keys, and sign-in to your DocuSign account.

  2. Click ADD APP AND INTEGRATION KEY. The Add Integration Key dialog appears.

    DocuSign-1
  3. In the Add Integration Key dialog enter the App Name, and click CREATE APP.

    DocuSign-2
  4. Save the Integration Key copy with you.

  5. Click ADD SECRET KEY to get secret key.

    DocuSign-3
  6. Copy and save the Secret Key with you.

  7. Click ADD URI to add Redirect URI.

    DocuSign-4
  8. Add your URI, for example, https://www.example.com/callback, and click SAVE. All details are saved.

  9. Open browser and search the URL after replacing it with your app’s Integration key and Redirect URI. https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature&client_id=YOUR_APP_INTEGRATION_KEY&redirect_uri=YOUR_APP_REDIRECT_URI

    Note:

    After entering the URL on the browser you may need to verify yourself by giving your DocuSign Credentials.

  10. After you verify the details, a callback code is generated in the URL itself. Copy the Callback URL Code, and save it with you.

    Note:

    The Callback URL Code expires in two minutes. You can regenerate it by calling the same URL in the browser.

    DocuSign-5
  11. Go to Postman to generate a refresh token.

  12. In the POST page replace the VALUE for the following KEYs:

    {{codeFromUrl}} with Callback URL Code.

    {{encodedKeys}} with integration key and secret key, concatenated by a colon character as (Integartion Key:Secret Key), converted into base64.
    DocuSign-6

    Make the following request to generate the Refresh Token:

    **POST:**
    https://account-d.docusign.com/oauth/token

    **Headers:**
    Content-Type: application/x-www-form-urlencoded
    Authorization: Basic {{encodedKeys}}

    **Body: x-www-form-urlencoded** (key value pair)
    code= {{codeFromUrl}}
    grant_type= authorization_code

    You will get Refresh Token under tag ‘refresh_token’ in JSON response.

    DocuSign-7

    Notes:
    • Callback URL Code expires two minutes. Therefore, if you get an ‘expired_client_token’ error after running Postman call, then regenerate ‘Callback URI Code’, and run the same Postman call again using the new Callback URI.

    • The lifetime of a refresh token (typically around 30 days) can vary depending on business needs and is subject to change at any time.