尝试使用python验证我的OAuth2应用程序时遇到了很多困难。当我尝试进行身份验证时遇到了invalid_client的问题。你能帮我解决一下吗?
以下是我的(相关)代码:
def setupOAuth2(cid):
oauth = OAuth2(client_id=BOX['APP_KEY'],
client_secret=BOX['APP_SECRET'],
store_tokens=store_token)
auth_url, csrf_token = oauth.get_authorization_url(u'https://app.box.com/api/oauth2/authorize')
print '1. Go to: ' + auth_url + ' and login.'
print '2. Click "Grant" (you might have to log in first)'
print '3. Copy the authorization code.'
webbrowser.open(auth_url)
code = raw_input("Enter the authorization code here: ").strip()
oauth.authenticate(code)
我最终进入我登录的auth页面,然后点击grant。点击授权后,我得到错误页面:
P.S。错误详情如下:
Show Error Details
state=box_csrf_token_fyMyuQcEAKqtAeEf