2017-04-03 119 views
0

我正在嘗試使用授權代碼授權流授權給我的應用程序文檔here。我正在構建一款應用程序,以支持使用REST API爲Docusign提供自動用戶提供服務。我已經創建了一個開發人員帳戶並獲得了集成密鑰和密鑰。OAuth授權代碼授予 - Docusign - 調用生成授權來從授權代碼生成訪問和刷新令牌時的錯誤響應

我提出下面的請求,以獲得在auth代碼:

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

什麼可能是此錯誤響應的可能原因?

回答

2

也許嘗試添加協議(https://)到請求URI?

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