How to use Amazon PA API5 to display Amazon product ads on my website?

0

Good Morning,

I am in process of building a website https://demunshomestead.com/ This site is hand coded using PHP and MDBootstrap css. Each page of the website at its base level consists of the following files. index.php, header.php, navbar.php, index-body.php, footer.php and of course the MDBootstrap css.

What I would like to do is to have pages on my website display ads for Amazon products using my associate/affiliate links. I would like these ads to display products on a continuosly rotating basis. The items in the ads should match with keywords found in the context of the webpage. For example if the webpage is an article on Organic Gardening, the Amazon products displayed in the ad module should be items that are useful when undertaking organic gardening.

My thought is to set something up that uses PA API to search for and display products based on these criteria above.

In this process I have installed PHP, APACHE24 and Composer on my local Windows 11 PC. I have used composer to obtain traydigita/paapi5-php-sdk and have made many attempts to build this out. At best I get a message on my website that displays an error stating that no products were found, or I get a broken image icon where the ad module should appear. At worst elements on my webpage don't load properly when the ads module is implemented.

I am reaching out hoping that someone can help guide me to understand how to make this work. Thank you for your time and input.

1 Answer
1

Hi,

Look at this page as a good starting point: https://github.com/amzn/amazon-advertising-api-php-sdk/tree/master

You have lots of examples about the various verbs of the API.

This page is the starting point for documentation: https://advertising.amazon.com/API/docs/en-us/guides/get-started/first-call

Best,

Didier

profile pictureAWS
EXPERT
answered 10 months ago
  • Thanks I will review this information. Though I was hoping for more of a step by step direction to build out (in PHP) an ads module that can be inserted into my webpages. This ads module would ideally continuously cycle through a variety of Amazon products, changing the displayed product every 5-10 seconds or so.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions