我正在尝试使用node-soap连接到bing ads soap api。我已经按照bing documentation中的建议创建了请求。但每次我尝试连接响应时,都会显示无效凭据(错误代码- 105)消息- Authentication failed。提供的凭据无效或帐户处于非活动状态。
我能够使用bing提供的示例C#代码对该应用程序接口进行身份验证。因此,很明显,凭证/令牌工作得很好。
有没有办法通过我的方法或在我的节点代码中确定问题。
soap.createClient(url, function (err, client) {
if (err) {
console.log("err", err);
} else {
client.addSoapHeader({
'AuthenticationToken': '<AuthenticationToken>',
'DeveloperToken': '<DeveloperToken>',
'CustomerId': '<CustomerId>',
'CustomerAccountId': '<CustomerAccountId>',
});
client.SubmitGenerateReport(args, function (err, result) {
if (err) {
console.log("err", err.body);
} else {
console.log(result);
}
});
}
});附言: Bing文档糟糕透顶。Stackoverflow万岁!
发布于 2017-12-17 11:38:26
您需要在标头中的每个键前面加上tns,例如:tns:AuthenticationToken
https://stackoverflow.com/questions/44590474
复制相似问题