Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth_nonce, oauth_timestamp, oauth_version #25

Closed
lv10 opened this issue Mar 18, 2013 · 2 comments
Closed

oauth_nonce, oauth_timestamp, oauth_version #25

lv10 opened this issue Mar 18, 2013 · 2 comments

Comments

@lv10
Copy link

lv10 commented Mar 18, 2013

I started using requests-oauthlib a few days ago. I came to the point where I need to use oauth_nonce, oauth_timestamp and oauth_version in the program that I am using to learn REST. I reviewed the code and went over the tutorial but I didn't find any of the above-mentioned parameters. I am new to REST and I may have missed or didn't fully understand the library, therefore I wanted to ask if you have support for oauth_nonce, oauth_timestamp and oauth_version.

Thanks in advance.

@mart-e
Copy link
Contributor

mart-e commented Mar 22, 2013

Not sure to understand your question. The library do use noce, timestamp and version number.

oauth = OAuth1(my_client_key, client_secret=my_client_secret)
r = requests.post(url=request_token_url, auth=oauth)

produce the HTTP request

POST /oauth/request_token?oauth_callback=oob HTTP/1.1
Host: api.twitter.com
Authorization: OAuth oauth_nonce="7845272804951018381363985206", oauth_timestamp="1363985206", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="tJ9F10gOpAMLzvEBinWsUA", oauth_signature="76561OLGylFKm1ZmmGz2gQSBpWk%3D"

The reason you don't see these arguments in the requests-oauthlib code is probably because all the computation is done in the oauthlib (dependecy) library.

@lv10
Copy link
Author

lv10 commented Apr 1, 2013

Thanks for the response. I was doing something wrong after playing with it for a little longer and reading other examples of code online I was able to figure it out.

@lv10 lv10 closed this as completed Apr 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants