0 Replies Latest reply on Aug 18, 2009 9:30 AM by AntoDon

    Problem linking into Amazon Advertising API

    AntoDon

      Hi,

       

      I am quite new to Flex and have been connecting to the Amazon Advertising API to create a sample application. The problem is that as of August 15th, the API requires an TimeStamp and Signature parameter. I created them by using the Signed Requests Helper at http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html and plugged the values into the http request as follows:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      <mx:HTTPService

       

       

      id="searchRPC" showBusyCursor="true" url="http://ecs.amazonaws.com/onca/xml" method="POST

      "

      result="searchResultHandler(event)" fault="searchFaultHandler(event)"

       

      >

       

       

      <mx:request

      >

       

       

      <AWSAccessKeyId>MYACCESSID

      </AWSAccessKeyId>

       

       

      <Keywords>{escape(this.parentDocument.keywordsTextInput.text)}

      </Keywords>

       

       

      <Operation>ItemSearch

      </Operation>

       

       

      <ResponseGroup>Medium,Reviews

      </ResponseGroup>

       

       

      <SearchIndex>Books

      </SearchIndex>

       

       

      <Service>AWSECommerceService

      </Service>

       

       

      <TimeStamp>2009-08-18T16:23:16.000Z

      </TimeStamp>

       

       

      <Title>{escape(this.parentDocument.titleTextInput.text)}

      </Title>

       

       

      <Version>2009-07-01

      </Version>

       

       

      <Signature>HDDIYtjmLPiP47FGFDf2aTe9TC0BeeM5uUUL7P2Paww=

      </Signature>

       

       

      </mx:request>

       

       

      </mx:HTTPService>

       

      Here is what the signed request would look like if passed as a url

       

      http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=MYACCESSID&Keywords=flex%0D&Operation=Ite mSearch%0D&ResponseGroup=Medium%2CReviews%0D&SearchIndex=Books%0D&Service=AWSECommerceServ ice%0D&Timestamp=2009-08-18T16%3A23%3A16.000Z&Title=Training%0D&Version=2009-03-31%0D&Sign ature=HDDIYtjmLPiP47FGFDf2aTe9TC0BeeM5uUUL7P2Paww%3D

       

      It shoots back a fault saying that my timestamp and signature are invalid.

       

      I would appreciate it if anyone could help me with this.

       

      Anthony