gpt4 book ai didi

google-oauth - Gmail API OAuth 错误 : Parameter not allowed for this message type: redirect_uri

转载 作者:行者123 更新时间:2023-12-05 00:48:46 25 4
gpt4 key购买 nike

Gmail OAuth API 在 2 月 17 日之前一直运行良好,POST /o/oauth2/token刷新 OAuth token 时随机返回此错误:

Parameter not allowed for this message type: redirect_uri



该错误大约发生 10 次中的 1 次。奇怪的是,在收到此错误后,下一个完全相同的请求成功了。因此,这与错误消息所建议的“redirect_uri”无关。

“此消息类型不允许使用参数”已在其他 StackOverflow 帖子中报告,但它们都是持久性错误,可以通过修复参数来解决。虽然我们得到的错误是暂时的。 10% 的费率对用户体验来说是昂贵的。

有没有人最近看到过类似的行为?

最佳答案

似乎谷歌最近更改了从刷新 token 获取新访问 token 的 url。旧网址是 https://accounts.google.com/o/oauth2/token新的是 https://www.googleapis.com/oauth2/v4/token .

我还记得redirect_uri以前是获取新访问 token 的参数之一,但它似乎不再存在:https://developers.google.com/identity/protocols/OAuth2WebServer#offline .只需查看 HTTP/REST 示例。

有可能只是删除 redirect_uri即使使用较旧的网址也可以使用,但我认为更改网址并删除 redirect_uri 是明智的。 .

关于google-oauth - Gmail API OAuth 错误 : Parameter not allowed for this message type: redirect_uri,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48912655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com