BeUK
BeUK

Reputation: 1

File_Get_Contents bad Request using Amazon MWS Class

Trying to request ten amazon product prices using the MWS API. If I paste the URL into my browser it works but the class supplied by Amazon in their code library doesnt.

Warning: file_get_contents(https://mws-eu.amazonservices.com/Products/2011-10-01?ASINList.ASIN.1=B0009U5CRC&ASINList.ASIN.10=B000AB25HA&ASINList.ASIN.2=0007192231&ASINList.ASIN.3=B000639DWM&ASINList.ASIN.4=B000639DWM&ASINList.ASIN.5=B000AOX7DI&ASINList.ASIN.6=B000ARIMNA&ASINList.ASIN.7=B001CD3PII&ASINList.ASIN.8=B000FOPOBQ&ASINList.ASIN.9=B00004CX5P&AWSAccessKeyId=AKIAJ5HY2TM5PQJSQN6Q&Action=GetLowestOfferListingsForASIN&ExcludeMe=true&MarketplaceId=A1F83G8C2ARO7P&SellerId=AJUM2E3VZ43L&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-09-28T09%3A00%3A25Z&Version=2011-10-01&Signature=Xt5sfG%2Fo7ebYfrHg%2B6mm%2FkeS0GEal%2FYzPFbv2laJBoY%3D): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /var/www/vhosts/_classes/class.MWSProducts.php on line 69

The code generating the issue is here

http://pastebin.com/A9qvRSpg

I know some may suggest curl but I don't particularly want to start altering code supplied by amazon too much.

Upvotes: 0

Views: 246

Answers (1)

user2689712
user2689712

Reputation:

I think you should try using "https://mws.amazonservices.co.uk/Products/2011-10-01" as service URL if you are using Amazon UK's API and "https://mws-eu.amazonservices.com/Products/2011-10-01" for EU API.

Upvotes: 1

Related Questions