我有 google 密钥、client_id 和 client_secret,我需要 google 令牌,但我阅读了 google 文档, https ://developers.google.com/blogger/docs/3.0/using#auth https://github.com/googleapis/google -api-python-client/blob/master/docs/oauth.md 我找不到如何获取令牌
code = input('Enter the authorization code: ')
flow.fetch_token(code=code)
我不明白如何获得令牌。搜索谷歌,我知道如何获得令牌
import requests
url = "https://oauth2.googleapis.com/token"
data = {
"client_secret": "xx",
"client_id": "xx",
"project_id": "seventh-ripsaw-315203",
"grant_type" : "authorization_code",
}
response=requests.post(url,data,timeout=5)
print(response.status_code,response.json())
但是提示 Missing required parameter: code,如何获取代码