1
继此文档时:https://www.docusign.com/developer-center/explore/features/sobo“范围必须API”使代表发送卷曲请求
我已经建立了以下卷曲要求:
curl --request POST \
--url 'https://demo.docusign.net/restapi/v2/oauth2/token?grant_type=password&client_id=<my integrator key>username=<my email>&password=<my password>&scope=api' \
--header 'accept: application/json' \
--header 'cache-control: no-cache' \
--header 'content-length: 0' \
--header 'content-type: application/x-www-form-urlencoded' \
然而,当我跑,我得到这种反应
{
"error": "invalid_scope",
"error_description": "Scope must be 'api'."
}
我得到同样的事情,当我运行一个的NodeJS类似的呼吁
var request = require("request");
var options = { method: 'POST',
url: 'https://demo.docusign.net/restapi/v2/oauth2/token',
qs:
{ grant_type: 'password',
client_id: '',
username: '',
password: '',
scope: 'api' },
headers:
{ 'cache-control': 'no-cache',
'content-length': '0',
accept: 'application/json',
'content-type': 'application/x-www-form-urlencoded' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
我使用这个网址也尝试过,但得到的“对象移动”响应:https://account-d.docusign.com/restapi/v2/oauth2/token
这没有意义对我来说,因为我有“的范围= API”就在的结束网址。这里发生了什么?
看起来你已经包括您的代码示例在您的登录凭据。我建议您立即更改密码(通过DocuSign Web控制台)并更新代码示例以不包含实际的用户名/密码。 –
谢谢Kim!建议听取了。你也可以在这里评论这个问题吗? – crdzoba