Skip to main content
New Voice
August 18, 2026
Question

Unable to complete the JWT token exchange. Error: invalid_request. Error description: .

  • August 18, 2026
  • 4 replies
  • 63 views

I have setup the JWT by following this post, but I am getting one error while calling API. I am getting this issue

https://www.docusign.com/blog/developers/how-to-set-up-salesforce-authentication-jwt-to-access-any-docusign-api


Line: 8, Column: 1
System.CalloutException: Unable to complete the JWT token exchange. Error: invalid_request. Error description: .

4 replies

JohnSantos
Guru
Guru
August 18, 2026

@rijwanmohmmed 

For a DocuSign Demo / Developer account, your External Credential should look like this:
Authentication Protocol    OAuth 2.0
Authentication Flow Type    JWT Bearer Flow
Identity Provider URL    https://account-d.docusign.com/oauth/token
Signing Algorithm    RS256
JWT Expiration    3600 or less
Signing Certificate    Certificate created from the DocuSign RSA private key

Can you confirm?

Welcome to the DocuSign Community! Your feedback is highly valued. If you find my response helpful, please give it a "Like" and consider marking it as the "Best Answer" to assist others with similar issues.
New Voice
August 18, 2026

 ​@JohnSantos Could you please check this 

New Voice
August 19, 2026

Hi ​@rijwanmohmmed 

The error Unable to complete the JWT token exchange. Error: invalid_request. Error description: is a generic token-exchange failure, so the exact authentication flow and environment are important.

If using Docusign JWT Grant

Please verify the following:

  • Use the correct token endpoint:

    • Demo: https://account-d.docusign.com/oauth/token

    • Production: https://account.docusign.com/oauth/token

  • Confirm the JWT uses RS256 and contains the correct claims:

    • iss: integration key

    • sub: impersonated user ID

    • aud: the matching Docusign account-server host

    • iat and exp: valid Unix timestamps

    • scope: signature impersonation

  • Confirm the RSA public key is configured on the integration key and that the JWT is signed with the matching private key.

  • Confirm that the user or administrator has granted consent for the integration to impersonate the user.

  • Verify that the request is sent as a form-encoded POST with:

grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=YOUR_JWT
  • Check that the server clock is synchronized and that the JWT has not expired.

  • Confirm that the integration key and user belong to the same environment: Demo or Production.

Docusign documentation:

If using Authorization Code Grant with PKCE

If this is not JWT Grant but Authorization Code Grant, an invalid_request with no additional description can indicate that the code_verifier does not match the original code_challenge.

Please verify that:

  • The authorization request uses code_challenge_method=S256.

  • The code_challenge is the Base64URL-encoded SHA-256 hash of the original code_verifier.

  • The same, unmodified code_verifier is sent during token exchange.

  • The authorization code is complete, has not expired, and has not already been used.

  • The correct Demo or Production token endpoint is being used.

  • For a single-page application, the configured Origin URL and Origin header are correct.

Documentation:

 

New Voice
August 24, 2026

Hi ​ ​@JohnSantos ​@marieelia 

This issue has been resolved. I am now able to send documents successfully via the REST API.

However, I am not receiving the envelope status updates such as Sent, Completed, Declined, etc.

I have installed the DocuSign Salesforce package, and I would like to create/update the status records in the following Salesforce object:

dfsle__EnvelopeStatus__c

I am currently getting the following error from DocuSign DAL:

{
"result": "SUCCESS",
"error": null,
"data": {
"status": "Ignored",
"message": "Not a Salesforce/DAL Envelope",
"requestId": "b29bd402-9739-4fb1-a03f-03f77150fc23"
}
}

Could you please help me understand why the REST API-created envelope is not being recognized as a Salesforce/DAL envelope and what configuration or changes are required to have the status records created in dfsle__EnvelopeStatus__c?

Thank you.