Gaurav S
Gaurav S

Reputation: 3

OAuth Authorization code grant - Docusign - Error response while making calls to generate access and refresh tokens from auth code

I am trying to use authorization code grant flow to authorize to my app Documentation here. I am building an app to support auto user provisoning to Docusign using REST APIs. i have created a developer account and have obtained Integrator Key and the secret key.

I made following request to obtain the auth code :

account-d.docusign.com/oauth/auth?response_type=code&scope=signature&client_id=<MY_CLIENT_ID>&redirect_uri=<localhost>  and the response on the browser with the code.

I am using curl command to generate tokens using the following request :

 curl -iX POST account-d.docusign.com/oauth/token -H "Authorization: Basic base64_representation_of_clientId:clientSecret" -d 'grant_type=authorization_code&code=<Auth Code recieved in the previous step>'

However I am getting this response :

  HTTP/1.0 301 Moved Permanently
 Location: account-d.docusign.com/oauth/token
 Server: BigIP
  Connection: Keep-Alive
  Content-Length: 0

What can be the possible reason for this error response?

Upvotes: 0

Views: 342

Answers (1)

Kim Brandl
Kim Brandl

Reputation: 13480

Perhaps try adding the protocol (https://) to the request URI?

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

Upvotes: 2

Related Questions