Skip to content
Advertisement

Product advertising API PHP invalid xml response

Hi I am a beginner programmer trying to integrate the API into my mobile app so I can view items from amazon from my app. I have followed all the 6 simple steps here but the example did not work for me, as shown here.

Here are my amazon PHP codes:
aws_signed_request.php

JavaScript

amazon_api_class.php

JavaScript

Example.php

JavaScript

Again, this is the result of running Example.php shown here. The result of print_r($result); is invalid xml respnse.

Advertisement

Answer

For my case, my error was InvalidClientTokenId , The X.509 certificate or AWS access key ID provided does not exist in our records. I simply (very carefuly) created a new access and secret keys with this guide and referred to this guide to confirm my associate ID.

To find your error, simply nullify the line with throw new Exception("Invalid xml response."); and add return ($response); and run the php page. Refer to this page for the list of errors.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement