anfederico / amazon-alert

Track prices on Amazon and receive email alerts for price drops

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error 400

kergoth opened this issue · comments

Getting this when attempting the intial setup: urllib2.HTTPError: HTTP Error 400: Bad Request. Any tips on how to diagnose?

After adding some exception handling, and going to the url manually, I see:

Your AccessKey Id is not registered for Product Advertising API. Please use the AccessKey Id obtained after registering at https://affiliate-program.amazon.com/gp/flex/advertising/api/sign-in.html.

It'd be useful to either document the requirement for the affiliate program credentials, or at least display more information on the failure.

Update: new failure: Your AccessKeyId is not authorized to perform this operation. Please check IAM policies for the Access Key.

Looks like since the Product Advertising API isn't fully supported by IAM, you need to either use the root credentials or attach the AdministratorAccess policy. I'd recommend documenting this requirement, as the project can't be used with any arbitrary aws access key, but only with this policy.

Ok, I will update the documentation.