Python 从OAuth2流的末尾获取用户详细信息
我不确定在成功实现oauth2流后如何获取使用详细信息 代码:Python 从OAuth2流的末尾获取用户详细信息,python,google-app-engine,oauth,Python,Google App Engine,Oauth,我不确定在成功实现oauth2流后如何获取使用详细信息 代码: 谢谢。为什么在auth\u uri上使用str()?应该没有必要这样做。在这个例子中,code是什么?@bernie str只是一个带有红色URL的习惯用语。代码就是“?code=sadasads”你在这里试过了吗? from oauth2client.client import OAuth2WebServerFlow flow = OAuth2WebServerFlow(... ... auth_uri = flow.step1
谢谢。为什么在
auth\u uri
上使用str()
?应该没有必要这样做。在这个例子中,code
是什么?@bernie str只是一个带有红色URL的习惯用语。代码就是“?code=sadasads”你在这里试过了吗?
from oauth2client.client import OAuth2WebServerFlow
flow = OAuth2WebServerFlow(...
...
auth_uri = flow.step1_get_authorize_url()
self.redirect(str(auth_uri))
....
credentials = flow.step2_exchange(code)
# credentials prints empty string