0
我想刷新我使用谷歌API按照指示过期的令牌上https://developers.google.com/accounts/docs/OAuth2WebServer#refresh刷新令牌使用谷歌API返回的INVALID_REQUEST
因此,这里是我的代码(蟒蛇)
refresh_token = requests.post(
'https://accounts.google.com/o/oauth2/token',
headers={
'Content-Type': 'application/x-www-form-urlencoded',
},
data=json.dumps({
'client_id': APP_ID,
'client_secret': APP_SECRET,
'refresh_token': refresh_token,
'grant_type': 'refresh_token',
})
)
不过,我得到的回应:
Status code: 400
{
"error" : "invalid_request"
}
我在做什么错?
Thanks!没有意识到这是一个标题问题 – silviomoreto