How can I use Amazon product advertising API for India?

1.4k Views Asked by At

I am sure many must have faced this issue I have been trying to establish a affiliate website for amazon. While trying to fetch its products though API i get this error Invalid Country-Code: in! Possible Country-Codes: de, com, co.uk, ca, fr, co.jp, it, cn, es

so any idea who has implemented this already ?

2

There are 2 best solutions below

0
jjeaton On

I don't get that error, I'm using the exeu/apai-io library. From your error message, it looks like you're using the old version of that library exeu/Amazon-ECS-PHP-Library.

Try upgrading to the new version as it supports both in and com.br.

FWIW, in hundreds of API requests for products that exist in all (or most of) the other Amazon stores, I've yet to get any results for an ASIN lookup from either in or com.br.

0
Lovely Arora On

find code in AmazonECS.class.php file

private $possibleLocations = array('de', 'com', 'co.uk', 'ca', 'fr', 'co.jp', 'it', 'cn', 'es');

Add "in" in above array

or simply replace with

private $possibleLocations = array('de', 'com', 'co.uk', 'ca', 'fr', 'co.jp', 'it', 'cn', 'es','in');

you will get the product list from amazon.in