Z
Z
zigen2014-09-11 10:37:54
Python
zigen, 2014-09-11 10:37:54

How to get oauth_verifier automatically?

Good day.
It occurred to me to come up with a simple script parsing jobs from Odessa.
Of course, I got the keys for odesk api and started sculpting and immediately realized that I didn’t understand how to solve the problem with getting the oauth_verifier verification key. Because by default the api suggests following the link and copying it from the page. Well, I think maybe just parse it from there? Grab use eg. I think many people have worked with oauth and know how to solve this problem. plz poke your nose

import odesk
import requests
client = odesk.Client(public_key, secret_key, **credentials)
authorize_url = client.auth.get_authorize_url()

# Invoke the authorize url
requests.get(authorize_url)

# Or in the desktop flow
verifier = raw_input(
    'Please enter the verification code you get '
    'following this link:\n{0}\n\n> '.format(
        client.auth.get_authorize_url()))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EvRiaL, 2014-10-04
@EvRiaL

requests-oauthlib.readthedocs.org/en/latest/oauth1...
In general, there are Python bindings for odesk https://github.com/odesk/python-odesk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question