-
Notifications
You must be signed in to change notification settings - Fork 18
Taobao OAuth 2.0
alswl edited this page Jan 9, 2013
·
1 revision
More TaoBAO API: http://open.taobao.com/doc/detail.htm?spm=0.0.0.18.URXG5o&id=118#s2
from pyoauth2 import Client
KEY = ''
SECRET = ''
CALLBACK = ''
client = Client(KEY, SECRET,
site='http://oauth.taobao.com',
authorize_url='https://oauth.taobao.com/authorizee',
token_url='https://oauth.taobao.com/token')
authorize_url = client.auth_code.authorize_url(redirect_uri=CALLBACK,
scope='item,promotion,usergrade')
# got code
code = 'xxxxxxx'
access_token = client.auth_code.get_token(code, redirect_uri=CALLBACK, parse='query')