Resources



Sample Code and Libraries

Product Advertising API Signed Requests Helper

Click for a printer friendly version of this document Printer Friendly Save to del.icio.us
Average Review:

A JavaScript-based tool to help you debug issues with signed requests.

Submitted By: ProductAdvtAPI@AMZN  
AWS Products Used: Amazon Associates Web Service
Language(s): JavaScript/AJAX
License: Apache License 2.0

This helper is available online at http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html

Alternatively, you may download the ZIP file, extract the contents to a folder and open index.html in a browser. This tool works best with Mozilla Firefox; other browsers including Internet Explorer have not been tested.

This tool allows you to provide a Product Advertising API request URL, your AWS Access Key ID and your AWS Secret Key. It then displays the corresponding signed URL. It also shows the intermediate values in the computation. You can compare these with the values you are seeing in your application, which should make it easier to debug problems.

This tool does not transmit any data; all calculations are done using JavaScript in your browser, hence you AWS Access Key and Secret Key are safe. Please be aware that Amazon.com will never ask you for your AWS Secret Key. This tool is provided only to help you debug your application by comparing the values shown by the tool with the values calculated by your application. Since this comparison can be accomplished by using a fake secret key instead of your actual one, you are strongly encouraged to do that to further reduce the chances of exposing your AWS Secret Key.

We will be grateful for feedback to improve this tool. Please post feedback at the Product Advertising API Community Forum.

Please note that this tool only works with REST/Query requests and not with SOAP.


Discussion

The 5 most recent discussion messages. View full discussion.

David L. Brough
Posts: 1
Registered: 6/16/09
Product Advertising API Signed Requests Helper
Posted: Jun 17, 2009 10:57 AM PDT
 
  Click to reply to this thread Reply

When I generate a signed request with the default Harry Potter search, Amazon returns with a "Service=" not valid

AWS.InvalidServiceParameter

I noticed you use a millisecond time for seconds, "00.000" in the Timestamp, is this required? The documentation is not clear.


Andrew Ward
RealName(TM)

Posts: 1,035
Registered: 2/8/06
Re: Product Advertising API Signed Requests Helper
Posted: Jun 18, 2009 2:58 AM PDT   in response to: David L. Brough
 
  Click to reply to this thread Reply

Probably best to ask in the (well-hidden) Product Advertising API forum:

http://developer.amazonwebservices.com/connect/forum.jspa?forumID=9


Reviews
Create Review Write a Review

Could use a validator, Jul 2, 2009 3:36 PM
Reviewer: Capesius
A simple signed URL validator would be more useful to most developers using prepared functions for signing. Paste in a signed URL and get an OK or an error report.

BUG: if you omit AWSAccessKeyId, Aug 14, 2009 1:51 AM
Reviewer: wishpot
If you use the signed requests helper and omit the AWSAccessKeyId as a param in your initial URL, it will add it (which makes sense, since we provide it up top) but it adds it at the wrong position. In my test, it adds it *after* the timestamp, which is incorrect according to this doc: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?RequestAuthenticationArticle.html= As a result, it then creates an invalid signature for the request.

Very Handy, Nov 5, 2009 8:43 PM
Reviewer: Rajat Garg
Thanks for the tool. This came in handy for my API implementation work. http://www.hotelsoutlook.com

Classic ASP Example, Nov 22, 2009 4:02 AM
Reviewer: tilanp
I am a Classic ASP developer. I want to integrate Amazon Custom Book search to my site http://www.FAT.lk Does anyone know how to create the API URL using Classic ASP / VBScript (i.e. without using Javascript)
Welcome, Guest Help
Login Login