anfederico / amazon-alert

Track prices on Amazon and receive email alerts for price drops
329 stars 43 forks source link

Error 400 #3

Closed kergoth closed 7 years ago

kergoth commented 7 years ago

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

kergoth commented 7 years ago

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.

kergoth commented 7 years ago

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

kergoth commented 7 years ago

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.

anfederico commented 7 years ago

Ok, I will update the documentation.