Having trouble trying to use gdata and oauth2 in python

我是研究僧i 提交于 2019-12-02 04:36:34
Theller

Finally i've fixed my issue with gdata.gauth: I used auth2token = gdata.gauth.OAuth2Token(client_id,client_secret,scope,user_agent)

After getting the authorization token i generate an authorized url to get an access code with auth2token.generate_authorize_url(redirect_uri=URL,approval_prompt="force").

once you get this url, you manually get the code and generate a refresh token, with which you generate an access token: token = auth2token.get_access_token(code). Easy enough. For any other information as to how to save the token to a blob string in a file here's the reference: gdata-python-api + Analytics with simple auth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!