python-amazon-simple-product-api icon indicating copy to clipboard operation
python-amazon-simple-product-api copied to clipboard

Amazon lookup failed, error: HTTP Error 400: Bad Request

Open embedded1 opened this issue 7 years ago • 11 comments

This error is shown for every URL I'm trying.

embedded1 avatar Jun 10 '17 16:06 embedded1

it seems Amazon has changed the access policy:

Important Change - Managing Your AWS Secret Access Keys As described in a previous announcement, you cannot retrieve the existing secret access keys for your AWS root account, though you can still create a new root access key at any time. As a best practice, we recommend creating an IAM user that has access keys rather than relying on root access keys.

mvillarejo avatar Jun 14 '17 22:06 mvillarejo

I don't think this is the issue. For the Advertising API you have to use root access keys. This warning is just telling you that if you don't have the secret key, your not going to be able to get it back.

JasonCrowe avatar Jun 14 '17 23:06 JasonCrowe

I'm also getting similar issues. I'm using the same email address for my PA API account, AWS Account, and Associate Account. I created a new IAM user account, retrieved the new access keys and updated the code. Still not working yet.

So many other users are also experiencing the same issues: https://forums.aws.amazon.com/message.jspa?messageID=787275. I'm pretty sure Amazon changed something about the authentication process, but I haven't found out what it is yet.

ramarlina avatar Jun 28 '17 15:06 ramarlina

I've followed the steps provided here: https://docs.aws.amazon.com/AWSECommerceService/latest/DG/becomingDev.html

  • Created a new IAM account
  • Created a new policy giving full access to the PA API
  • Assigned the new policy to the new account
  • Downloaded IAM account keys
  • Updated access keys in the code
  • Made sure I'm registered to the US region
  • added region='US' when creating the amazon client

Still getting a 400 error.

[Update:FIXED] This actually worked, I just needed to wait a few minutes for the changes to take effect.

ramarlina avatar Jun 28 '17 15:06 ramarlina

Make sure you are using a US associates account. I was having trouble with my Canadian account.

lpasselin avatar Jul 29 '17 04:07 lpasselin

yes, it is not an issue. make sure your amazon

AWSAccessKeyId, AWSSecretKey, unique Associate ID are all right and can be used

xz0405 avatar Aug 09 '17 10:08 xz0405

I believe that Amazon made a change about what credentials could access each region. In the past, I have been able to use my credentials to access other regions, but lately, I am only able to access regions outside of the U.S. by using credentials made specifically for those outside regions.

JasonCrowe avatar Sep 29 '17 16:09 JasonCrowe

@ramarlina how many minutes? it's been about an hour now. :-/

keredson avatar Sep 20 '18 23:09 keredson

to answer for anyone else hitting here from google: access to PA API is no longer included by default in your associates account. you have to apply / get approved. you're ineligible to apply until you've completed at least 3 qualified sales through the associate's problem, and you've been manually reviewed/approved. you can send an email through the associate's help system to request early access (it has to be an email, calling or using the chat function won't do it). they claim a 3-4 day turnaround for the decision. (however the amazon rep i spoke w/ using the chat function told me not to get my hopes up.)

keredson avatar Sep 21 '18 23:09 keredson

Dear associate,

We regret to inform you that we are unable to accept your request for access to the Product Advertising API. We have reviewed your site and found the following issues that prevent us from approving your account for access: while reviewing your request, we see that you did not include a valid business justification that explained your intended use of the Product Advertising API.

However, your account is still pending review. In the meantime, you can make use of the other product linking tools available on Associate Central. You can learn more about building your website and making use of these tools via this link: https://affiliate-program.amazon.com/resource-center/?ac-ms-src=ac-nav.

FAQs on Product Linking can be found here: https://affiliate-program.amazon.com/help/node/202049370

Thank you for your interest in the Associates Program.

keredson avatar Sep 25 '18 16:09 keredson

Pretty fed up with how Amazon handles their APIs. Apparently, for me, I've applied for an Amazon Associates account, but I must drive at least three qualified sales within 180 days before I can be accepted. This goes against our site's anti-ad policy (not that we'd be able to get those sales anyways).

It would be really nice if Amazon actually fixed up how they handle their APIs. :/

queengooborg avatar Oct 20 '18 10:10 queengooborg