Google oauth2中的invalid

编程入门 行业动态 更新时间:2024-10-21 06:42:58
本文介绍了Google oauth2中的invalid_client的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试制作一个用于上传youtube视频的网页,因此我尝试从google api控制台获取客户端ID,并且在api控制台中显示如下内容:

I try to make a web page for youtube video upload, therefore I try to get the client id from google api console, and in the api console it shows something like this:

Client ID: 533832195920.apps.googleusercontent Redirect URIs: bobyouku.ap01.aws.af.cm/testyoutube.php developers.google/oauthplayground

但是,当我尝试使用以下URL测试我的帐户时:

However when I try to test my account using the following URL:

accounts.google/o/oauth2/auth?client_id = 533832195920.apps.googleusercontent& redirect_uri = http%3A%2F%2Fbobyouku.ap01.aws.af.cm%2Ftestyoutube.php& scope = https%3A%2F%2Fwww.googleapis% 2Fauth%2Fyoutube& response_type = code& access_type = offline

它给出了invalid_client的结果.即使我在oauth2操场上尝试,也会发生同样的失败

It gives out the result of invalid_client. Even when I try it on oauth2 playground, same fail occurs

所以有人知道会发生什么事吗?

So anyone knows what's happen?

推荐答案

设置/更改您的产品名称,在创建与项目名称相同的产品名称之前,我一直遇到这个问题.

Set/change your product name, I had this issue until I created a product name as same as project name.

可以在您的项目的Google Developers Console的同意"屏幕部分中设置产品名称.看一下API&在左侧导航栏中进行身份验证,然后选择同意"屏幕. 您还需要在产品名称上方的框中设置您的电子邮件地址.

The product name can be set in the Consent screen section of the Google Developers Console for your project. Look under APIs & auth in the left navigation and select Consent screen. You need also to set your email address in the box above the product name.

更多推荐

Google oauth2中的invalid

本文发布于:2023-11-12 04:13:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580485.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Google   invalid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!