【问题标题】:Product advertising API not working产品广告 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>

【问题讨论】:

    标签: node.js api amazon ads


    【解决方案1】:

    正如错误提示,您需要 Amazon Associate 帐户才能访问 API。您使用的凭据似乎无效。你可以在这里测试你的凭据Amazon Scratch pad

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多