gpt4 book ai didi

node.js - (Nodejs)谷歌oAuth2 : Required parameter is missing: grant_type

转载 作者:太空宇宙 更新时间:2023-11-03 22:17:06 25 4
gpt4 key购买 nike

使用 Nodejs 和 Mikeal 的 Request 进行此调用。执行文档所说的所有操作 here包括 grant_type=authorization_code 但我仍然不断收到相同的错误。请参阅屏幕截图以了解我传递的确切变量和方法。

Screenshot of error

这是首先显式设置 grant_type 的路径的样子

/o/oauth2/token?grant_type=authorization_code&code=4%2F42sz3xxq4wGF9k9joYxRVop9mHi6.UpFaIUqZ_UQaaDn_6y0ZQNh869DgiwI&client_id=199079322117.apps.googleusercontent.com&client_secret=...&redirect_uri=...

最佳答案

事实证明,需要在初始 oauth 请求中发送重定向 uri,以便在交换 token 时能够匹配某些内容。

在这里发布了我的答案,解释了我如何结束必须使用弹出窗口构建自己的 oauth 用户流程(而不是在主应用程序中重定向用户)Node Google OAuth2 redirect_uri_mismatch

关于node.js - (Nodejs)谷歌oAuth2 : Required parameter is missing: grant_type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23609180/

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