Basic Setup & Configuration

In this Example you will learn how to setup & configure the Amazon Product api PHP interface library.

Basic Configurations

  1. Require the AmazonProductAPI main class
    require_once( dirname(__FILE__) . '/AmazonProductAPI.php' );

    *Please note that the path may very depending on where your script is in comparison to the Library.

  2. Register the Auto Loader
    spl_autoload_register(array('AmazonProductAPI', 'autoload') );

    By using the Auto Loader we ensure that classes are loaded only if they are needed.

  3. Set Amazon Account information
    $api = new AmazonProductAPI();
    $api->setAccessKey( "public-key" );
    $api->setSecretKey( "secret-key" );

    *To utilize the Amazon Product API you will need to have a Amazon Web Service account. This account is free and once created will provide you with the credentials needed to use the API. To create your account visit the Amazon Web Service website.

Where to go from here

  • How to do a Product Search – An introductory tutorial walking you through the request options and the returned AmazonProduct_Result object.

Comments & Questions

  1. I wanna add amazon.es to the plugin so my products can appear in € (euros) and in my languague, spanish. How can I do that?

  2. Is the Amazon Web Service account only free for one year? Or always free if used only with this plugin?

    1. Michelle, the Amazon Web Service is free to sign-up for. If you sign-up for any additional products they offer then they have their own costs. However for this plugin you don’t need to have any additional services just an account so that you have security credentials to access the Amazon Product Advertising API which the plugin utilizes to lookup products.

Add Your Comment

Leave a Reply to Pedro Antonio Jiménez Pérez Cancel