Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7063357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:42:15+00:00 2026-05-28T04:42:15+00:00

I am keep getting the 400 Bad Request Error . Please can any one

  • 0

I am keep getting the 400 Bad Request Error. Please can any one tell me what i am doing wrong here?? I don’t want to use libraries.

from requestmanager import RequestManager
from datetime import datetime
from urllib import quote

dt = quote(datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S'))
sign = quote('mySecretAceessKey')
key = 'myKey'
if __name__ == '__main__':
    rP = RequestManager()
    url = 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId='+key+'&Operation=ItemLookup&ItemId=B003MWJKVI&ResponseGroup=Large&Timestamp='+dt+'&Signature='+ sign

    response = rP.getContent(url)
    content = response.RESPONSE

I am following the steps mention here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:42:15+00:00Added an answer on May 28, 2026 at 4:42 am

    The format of your timestamp variable is incorrect. Take the url you’ve created, put it in your browser and check out the xml message you get back. Try creating your timestamp like so:

    import time
    dt = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
    

    After I corrected for that I was getting HTTPError: HTTP Error 403: Forbidden. Trying the url in the browser tells me (amongst other things that I’ve redacted):

    ... <Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message></Error> ...
    

    I found that as of August 17th, 2009, Amazon requires that all requests to their Product Advertising API be signed.

    The following link provides a very nice methodology for creating the necessary url, check it out: http://www.princesspolymath.com/princess_polymath/?p=182

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting bad pointers. Can anyone tell me what am I doing wrong?
I am posting a checkin to 4sq but keep getting 400 Bad Request. Here
I keep getting a 400 bad request code from a hotfile.com page when I
I keep getting the 400 bad request if there is de-serialization issue / other
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I keep getting a PermGen error on my Tomcat 6 server. I know what
I keep getting this NPE in my application and I can't seem to get
I keep getting a 'List does not exist' error whenever I try and use
I keep getting some weird error in Processing, using the following tiny piece of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.