我正在尝试将客户端提供的auth_代码转换为后端的令牌。(前面和后面是两个不同的发球局)。在
scope='https://www.googleapis.com/auth/calendar' code='code=4/nQCEBlo_YbWfOw1NXCWJ3UCyRzPT*****NJbda0eaXdmv032qX2PZhV4Cd2YzO3sPQ36*************' # Exchange auth code for access token, refresh token, and ID token c = client.credentials_from_code('***ClientID*****-*****************.apps.googleusercontent.com' ,'SECRET*********',scope,code) print (c.id_token)
另一个尝试是:
CLIENT_SECRET_FILE = 'client_secret.json'
credentials = client.credentials_from_clientsecrets_and_code(
CLIENT_SECRET_FILE,
['https://www.googleapis.com/auth/calendar'],
'code=4/nQCEBlo_YbWfOw1NXC****************4Cd2Y*********mGgA')
我收到这个错误:
^{pr2}$有什么想法吗? 谢谢!
目前没有回答
相关问题 更多 >
编程相关推荐