首页 文章

https://accounts.google.com/o/oauth2/auth?错误:redirect_uri_mismatch

提问于
浏览
-1

我正在尝试使用Google API进行身份验证,但一直在 Error: redirect_uri_mismatch 我已经在谷歌控制台_409256中设置了我的重定向网址,但它一直在说 The redirect URL in the request: http:/localhost:6804/authorize/ did not match a registered redirect URL.

我已经将我的URL设置为可能不同的URL,但它仍然是sugesting http:/localhost:6804/authorize/ 是错误的,无论我插入了什么URL .

我也尝试将我的重定向URL设置为http:/ localhost:6804 / authorize /但继续收到错误消息 .

每次我做出更改时都会更新我的client_secrets.json,并且等待更改设置已经累了 .

这是我收到的错误消息:

请求详细信息scope = https://www.googleapis.com/auth/youtube.upload response_type = code redirect_uri = http:/ localhost:6804 / authorize / access_type = offline pageId = none client_id = 789526175471-mh3o48ooi8va0mr0lke62pvqnf3kd2fj.apps.googleusercontent . 这就是我们所知道的 .

enter image description here

1 回答

  • 1

    也许这只是一个错字,它可能不是你的问题的原因,但在你的URL中 http: 之后应该有两个斜杠( // ):

    http://localhost:6804/authorize/
    

    代替

    http:/localhost:6804/authorize/
    

    此外,在上面的Google控制台屏幕截图中,我没有看到此URL注册为重定向URI . 我认为这只是你做过的一项测试,对吧?

相关问题