Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 从OAuth2流的末尾获取用户详细信息_Python_Google App Engine_Oauth - Fatal编程技术网

Python 从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

我不确定在成功实现oauth2流后如何获取使用详细信息

代码:


谢谢。

为什么在
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