ForumsSearch
Search results for "Posted by notprivategabe"
Author | Message |
---|---|
notprivategabe |
Hi Folks,
I'm posting a sanitized version of a python oriented oauth script I made for others who want to use python for their authorization. You do not need to handle callbacks appropriately, just copy the auth code from the broken URL. It uses requests_oauthlib and requests module; it then pickles the full token once generated for later use (including refreshes). You can view it here: https://gist.github.com/gadeleon/ba9be09e42ed2053f23a Running the script is simple, write in your client details, secret, and whatever you registered as the redirect URI ( http://localhost is probably the easiest. Using python python_oauth_example.py --new-token will take you through the authorization and auth code process. Using --refresh-token will simply renew the token. Last week I was trying to get a python oriented CLI program up and running. I'm not a sophisticated programmer by any means so Toodledo's lack of python oauth examples meant I had to go digging. Since it's CLI, I'm also not interested in trying to appropriately handle the callback/redirect and Toodledo doesn't support urn:ietf:wg:oauth:2.0:oob which would have made things a lot easier. Enjoy, I hope this saves people some time! This message was edited Jan 23, 2016. |