C# Amazon Product Advertising API

2020-05-19 07:58发布

As of August 15, Amazon made it compulsory to sign all requests made to their Product Advertising API. I thought I had got everything working just fine but when the 15th finally came around, my web application stopped working and pretty much ever since I have been trying to find out how to sign the SOAP requests.

Amazon has an outdated sample code for signing requests that doesn't appear to work here

Basically, I need to know how to add a signature to the my requests using the most current C# SOAP API and .NET 3.5.

I hope I have given enough details, if I haven't please feel free to ask me to elaborate.

Thank You
The_Lorax

UPDATE: I am using MVC and need to know how to add the Signature to the the ItemLookup or AWSECommerceService object. Is there an attribute that contains the signature value? How does it get attached to the request?

On this page, they say that I must include the Signature and TimeStamp parameters but the intellisense does now show any such attributes.

2条回答
时光不老,我们不散
2楼-- · 2020-05-19 08:37

This library automatic sign the requests (Install-Package Nager.AmazonProductAdvertising) https://www.nuget.org/packages/Nager.AmazonProductAdvertising/

Example:

var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.UK);
var result = wrapper.Search("canon eos", AmazonSearchIndex.Electronics, AmazonResponseGroup.Large);
查看更多
Lonely孤独者°
3楼-- · 2020-05-19 08:48

Check out http://flyingpies.wordpress.com/2009/08/01/17/. It has a walkthrough and a sample visual studio solution using C#, SOAP, WCF on .NET 3.5.

查看更多
登录 后发表回答