![](/img/trans.png)
[英]Where to put affiliate id in amazon product advertising api call in java
[英]Error trying to consume Amazon Product Affiliate API
我正在嘗試使用亞馬遜產品會員API,這確實是一個令人困惑的體驗。
我已經注冊了AWS,所以我還有我的ACCESS_KEY_ID
和SECRET_ACCESS_KEY
我已經在https://affiliate-program.amazon.com/
並獲得了我的Tracking ID
現在,當嘗試使用此URL發出請求時
http://ecs.amazonaws.com/onca/xml?
AWSAccessKeyId=AKIAI4E9BPWYGSC7VNZQ
&ItemId=0545010225
&Operation=ItemLookup
&ResponseGroup=Small
&Service=AWSECommerceService
&Timestamp=2014-03-05T15%3A55%3A46Z
&Version=2009-03-31
&Signature=mb6Stjz4I5GHV51bxVyACS4T%2FwGjplkVymW8eLDoh4Q%3D
&AssociateTag=sample026-20
我得到一個錯誤
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided.
Check your AWS Secret Access Key and signing method.
Consult the service documentation for details.</Message>
</Error>
我提供了所有必需的參數,但不確定為什么信息不匹配。 如果我從URL中刪除AssociateTag
參數,則會收到此錯誤:
<Error>
<Code>AWS.MissingParameters</Code>
<Message>Your request is missing required parameters. Required parameters include AssociateTag.</Message>
</Error>
注冊亞馬遜鏈接后, AssociateTag
與我收到的Tracking ID
是否有所不同?
我正在嘗試獲取示例代碼表單http://aws.amazon.com/code/Product-Advertising-API/2478
來執行。 除非那里有更好的選擇。
這個對我有用。 您的簽名可能有誤。 AssociateTag是您注冊會員后獲得的“會員ID”,而不是任何跟蹤ID。 我簽署了Amazon.co.uk Associates。
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01">
<OperationRequest>
<HTTPHeaders>
<Header Name="UserAgent" Value="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36"/>
</HTTPHeaders>
<RequestId>5f5e44b1-8005-4b27-846a-9959775bdf24</RequestId>
<Arguments>
<Argument Name="Operation" Value="ItemLookup"/>
<Argument Name="Service" Value="AWSECommerceService"/>
<Argument Name="Signature" Value="Vfto8GdjP875KGwYrpe1QyfDkpUr3HDkQAyAcyyI4n0="/>
<Argument Name="AssociateTag" Value="jay048-21"/>
<Argument Name="Version" Value="2009-03-31"/>
<Argument Name="ItemId" Value="0545010225"/>
<Argument Name="AWSAccessKeyId" Value="AKIAIAAPUKLVP6OGAT4Q"/>
<Argument Name="Timestamp" Value="2014-03-05T17:14:31Z"/>
<Argument Name="ResponseGroup" Value="Small"/>
</Arguments>
<RequestProcessingTime>0.0143640000000000</RequestProcessingTime>
</OperationRequest>
<Items>
<Request>
<IsValid>True</IsValid>
<ItemLookupRequest>
<IdType>ASIN</IdType>
<ItemId>0545010225</ItemId>
<ResponseGroup>Small</ResponseGroup>
<VariationPage>All</VariationPage>
</ItemLookupRequest>
</Request>
<Item>
<ASIN>0545010225</ASIN>
<DetailPageURL>
http://www.amazon.com/Harry-Potter-Deathly-Hallows-Book/dp/0545010225%3FSubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0545010225
</DetailPageURL>
<ItemLinks>
<ItemLink>
<Description>Technical Details</Description>
<URL>
http://www.amazon.com/Harry-Potter-Deathly-Hallows-Book/dp/tech-data/0545010225%3FSubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>Add To Baby Registry</Description>
<URL>
http://www.amazon.com/gp/registry/baby/add-item.html%3Fasin.0%3D0545010225%26SubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>Add To Wedding Registry</Description>
<URL>
http://www.amazon.com/gp/registry/wedding/add-item.html%3Fasin.0%3D0545010225%26SubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>Add To Wishlist</Description>
<URL>
http://www.amazon.com/gp/registry/wishlist/add-item.html%3Fasin.0%3D0545010225%26SubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>Tell A Friend</Description>
<URL>
http://www.amazon.com/gp/pdp/taf/0545010225%3FSubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>All Customer Reviews</Description>
<URL>
http://www.amazon.com/review/product/0545010225%3FSubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
<ItemLink>
<Description>All Offers</Description>
<URL>
http://www.amazon.com/gp/offer-listing/0545010225%3FSubscriptionId%3DAKIAIAAPUKLVP6OGAT4Q%26tag%3Djay048-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0545010225
</URL>
</ItemLink>
</ItemLinks>
<ItemAttributes>
<Author>J. K. Rowling</Author>
<Creator Role="Illustrator">Mary GrandPré</Creator>
<Manufacturer>Arthur A. Levine Books</Manufacturer>
<ProductGroup>Book</ProductGroup>
<Title>Harry Potter and the Deathly Hallows (Book 7)</Title>
</ItemAttributes>
</Item>
</Items>
</ItemLookupResponse>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.