I am having a basic query related to Docusign API. This query is more of API related rather than Docusign related. 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 below).
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”: “actual code”}
Thanks!
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...