0
votes

I'm trying to make some search on Amazon Product Ads and using the botlenose to help me do this. But, I'm just receive the HTTP Error 400.

Some other important infos:

I'm from Brazil, and my TAG from Amazon too. Is it a problem?

I did check my KEY, Secret and TAG and it's OK. I did look some other questions on StackOverflow, but nothing work for me.

import bottlenose
AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXX"
AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxxxxxxxxxxxxx"
AWS_ASSOCIATE_TAG="yyyyyyyyyyy"
amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG,  Region='BR')
response = amazon.ItemLookup(ItemId="B007OZNUCE")

enter code here# Of course, I changed the keys for security reasons.

Traceback (most recent call last): File "", line 6, in File "/Users/am/Documents/PycharmProjects/08/lib/python3.7/site-packages/bottlenose/api.py", line 274, in call {'api_url': api_url, 'cache_url': cache_url}) File "/Users/am/Documents/PycharmProjects/08lib/python3.7/site-packages/bottlenose/api.py", line 235, in _call_api return urllib2.urlopen(api_request, timeout=self.Timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(*args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request

1

1 Answers

0
votes

After that, I tried to generate the signed url by: http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html

and tried do put the both urls (by bottlenose and by Amazon link), and both return the same error> Later I tried by Browser the same URLs and I received the error:

<ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2013-08-01/">
<Error>
<Code>AWS.InvalidAccount</Code>
<Message>
Your AccessKey Id is not registered for Product Advertising API. Please use the AccessKey Id obtained after registering at https://affiliate-program.amazon.com/assoc_credentials/home.
</Message>
</Error>
<RequestID>4d761947-8b00-44d4-a9c0-0a9079e8d603</RequestID>
</ItemLookupErrorResponse>

Now, I'm contacting the Amazon Support to fix it.

Thanks for all!