产品广告 API 不起作用
Posted
技术标签:
【中文标题】产品广告 API 不起作用【英文标题】:Product advertising API not workin***品广告 API 不起作用 【发布时间】:2017-06-06 09:42:12 【问题描述】:我刚刚加入亚马逊产品广告 API 的助理计划。我可以在暂存器中运行查询,但是在编码时它会出错。请在我出错的地方给我任何建议。我正在为此使用 Node.JS。
const OperationHelper = require('apac').OperationHelper;
const opHelper = new OperationHelper(
awsId: '',
awsSecret: '',
assocId: 'tarun123-21'
);
opHelper.execute('ItemSearch',
'SearchIndex': 'Books',
'Keywords': 'harry potter',
'ResponseGroup': 'ItemAttributes,Offers',
'Service' : 'AWSECommerceService'
).then((response) =>
console.log("Results object: ", response.result);
console.log("Raw response body: ", response.responseBody);
).catch((err) =>
console.error("Something went wrong! ", err);
);
它给出了以下错误:
Results object: ItemSearchErrorResponse:
'$': xmlns: 'http://ecs.amazonaws.com/doc/2013-08-01/' ,
Error:
Code: 'AWS.InvalidAssociate',
Message: 'Your AKIAI7SZEKEZNMFWGJDQ is not registered as an Amazon Assoc
iate. Please register as an associate at https://affiliate-program.amazon.com/gp
/associates/join/landing/main.html.' ,
RequestId: 'e860887e-4bf7-4076-bfa9-6d2212324ba4'
Raw response body: <?xml version="1.0"?>
<ItemSearchErrorResponse xmlns="http://ecs.amazonaws.com/doc/2013-08-01/"><Error
><Code>AWS.InvalidAssociate</Code><Message>Your AKIAI7SZEKEZNMFWGJDQ is not regi
stered as an Amazon Associate. Please register as an associate at https://affili
ate-program.amazon.com/gp/associates/join/landing/main.html.</Message></Error><R
equestId>e860887e-4bf7-4076-bfa9-6d2212324ba4</RequestId></ItemSearchErrorRespon
se>
【问题讨论】:
【参考方案1】:正如错误提示,您需要 Amazon Associate 帐户才能访问 API。您使用的凭据似乎无效。你可以在这里测试你的凭据Amazon Scratch pad
【讨论】:
以上是关于产品广告 API 不起作用的主要内容,如果未能解决你的问题,请参考以下文章
即时游戏广告不起作用 - showAsync' 为 null
Admob 测试广告不起作用,只有真实的广告在显示 - Android
Admob 测试广告不起作用,只有真实的广告在显示 - Android