我尝试制作一个用于上传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
发布评论