简体   繁体   English

C#亚马逊产品广告API

[英]C# Amazon Product Advertising API

As of August 15, Amazon made it compulsory to sign all requests made to their Product Advertising API.截至 8 月 15 日,亚马逊强制要求签署对其产品广告 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.我以为我已经一切正常了,但是当 15 日终于到来时,我的 Web 应用程序停止工作,并且几乎从我一直试图找出如何签署 SOAP 请求开始。

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.基本上,我需要知道如何使用最新的 C# SOAP API 和 .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.更新:我正在使用 MVC,需要知道如何将签名添加到 ItemLookup 或 AWSECommerceService 对象。 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.此页面上,他们说我必须包含签名和时间戳参数,但智能感知现在确实显示了任何此类属性。

Check out http://flyingpies.wordpress.com/2009/08/01/17/ .查看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.它有一个演练和一个示例 Visual Studio 解决方案,在 .NET 3.5 上使用 C#、SOAP、WCF。

This library automatic sign the requests (Install-Package Nager.AmazonProductAdvertising) https://www.nuget.org/packages/Nager.AmazonProductAdvertising/该库自动签署请求 (Install-Package Nager.AmazonProductAdvertising) https://www.nuget.org/packages/Nager.AmazonProductAdvertising/

Example:例子:

var authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US);
var result = await client.SearchItemsAsync("canon eos");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM