You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frompyoauth2importClientKEY=''SECRET=''CALLBACK=''client=Client(KEY, SECRET,
site='https://api.box.com/2.0',
authorize_url='https://api.box.com/oauth2/authorize',
token_url='https://api.box.com/oauth2/token')
print'-'*80authorize_url=client.auth_code.authorize_url(redirect_uri=CALLBACK)
print'Go to the following link in your browser:'printauthorize_urlprint'-'*80code=raw_input('Enter the verification code and hit ENTER when you are done:')
code=code.strip()
access_token=client.auth_code.get_token(code, redirect_uri=CALLBACK)
print'token', access_token.headersprint'-'*80ret=access_token.get('/folders/0')
printret.parsed