Skip to main content
Question

Dosusign Access token generation API

  • December 10, 2024
  • 1 reply
  • 36 views

Forum|alt.badge.img+1

Hi All,

 

I am having a basic query related to Docusign API. This query is more of API related rather than Docusign related, however still posting here as it concerns Docusign. I am following this video for querying docusign API. Here at timestamp 5:44 the API body is passed as ‘x-www-form-urlencoded’(snapshot attached).

 

However, I am making this API call using my automation tool(Uipath) which lacks the ‘x-www-form-urlencoded’ interface similar to postman. It is possible to pass the body as JSON instead of ‘x-www-form-urlencoded’? I tried passing JSON body as below but it didn’t work.

 

{“grant_type”: “authorization_code”, “code”: “<code>”}

 

Thanks!

 

1 reply

karan.kaushik
Docusign Employee
Forum|alt.badge.img+3
  • Docusign Employee
  • 23 replies
  • December 11, 2024

Hi ​@kapil775 , welcome to the Docusign Community!

 

The API call you're showing is the authorization code exchange request for the OAuth Authorization Code grant flow. See RFC 6749 section 3.2

Docusign implements OAuth according to the v2 standards and uses the x-www-form-urlencoded (form encoding) for the request body.

There is no plan (plus it would not be standard) to accept a JSON body.

What might work is to use query parameters. Try it to see. Example:

POST https://account-d.docusign.com/oauth/token?grant_type=authorization-code
&code=jkndsanj8y7yqewhiasdjkn...