Menu

#4 Added authentication to REST requests using secret key

open
nobody
None
5
2009-07-12
2009-07-12
Anonymous
No

From August 2009 Amazon will require all REST requests to have a hash appended to url parameters of all REST requests.

More informtation here: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?RequestAuthenticationArticle.html

Discussion

  • Nobody/Anonymous

    Updated ecs.py file

     
  • Nobody/Anonymous

    Thanks a lot! I modified ecs.py version 0.3 from Kun Xi (http://kunxi.org/archives/2008/05/pyaws-030-released/) after your changes and it works. Seems that I cannot attach it here :(

     
  • Nobody/Anonymous

    Just to add, the occurrences of

    for (k,v) in sortedArgv if v

    should really be

    for (k,v) in sortedArgv if v is not None

    because *without* this tweak, values of 0 are omitted from the request, which means that removing an item from a cart by setting its quantity to 0 would fail.

    Hope this helps!

     
  • Nobody/Anonymous

    Also, the timestamp is not in UTC. Instead the datetime module should be imported. Then in buildRequest there should be

    argv['Timestamp'] = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")

    instead of

    argv['Timestamp'] = strftime("%Y-%m-%dT%H:%M:%SZ")

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.