Xauth using python-oauth2

I am trying to implement xauth for instapaper using python-oauth2. I can find samples for oauth, but I did not find them for xauth. Can anyone share samples or api documentation?

+8
python sample xauth
source share
1 answer

here is the code that finally worked for me


consumer_key=<key> consumer_secret=<secret> access_token_url = 'https://www.instapaper.com/api/1/oauth/access_token' consumer = oauth.Consumer(consumer_key, consumer_secret) client = oauth.Client(consumer) client.add_credentials(instaaccount,instapassword) params = {} params["x_auth_username"] = instaaccount params["x_auth_password"] = instapassword params["x_auth_mode"] = 'client_auth' client.set_signature_method = oauth.SignatureMethod_HMAC_SHA1() resp, token = client.request(access_token_url, method="POST",body=urllib.urlencode(params)) 
+11
source share

All Articles