Created
August 3, 2012 21:00
-
-
Save DevJohnC/3251469 to your computer and use it in GitHub Desktop.
python oauth request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| url = "etrade request credentials url" | |
| consumer = oauth.Consumer(key="your consumer key", secret="your secret") | |
| params = { | |
| 'oauth_nonce': oauth.generate_nonce(), | |
| 'oauth_timestamp': int(time.time()), | |
| 'oauth_callback': 'oob', | |
| 'oauth_consumer_key': consumer.key | |
| } | |
| req = oauth.Request(method="POST", url=url, parameters=params) | |
| signature_method = oauth.SignatureMethod_HMAC_SHA1() | |
| req.sign_request(signature_method, consumer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment