OAuth授权代码授予 - Docusign - 在进行调用以生成访问权限并从授权代码刷新令牌时的错误响应

时间:2017-04-03 09:02:43

标签: docusignapi

我正在尝试使用授权代码授权流程来授权我的应用文档here。我正在构建一个应用程序,以支持使用REST API对Docusign进行自动用户管理。我创建了一个开发人员帐户,并获得了Integrator Key和密钥。

我提出了以下请求以获取身份验证码:

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.

我正在使用curl命令使用以下请求生成令牌:

 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>'

但是我得到了这样的答复:

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

此错误响应的可能原因是什么?

1 个答案:

答案 0 :(得分:2)

也许尝试将协议(https://)添加到请求URI?

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