Google API错误400:“未找到客户项目” [英] Google API Error 400: "Client project not found"

查看:227
本文介绍了Google API错误400:“未找到客户项目”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次潜入Google API。我试图按照Google说明进行简单的测试。此时,我创建了该项目并设置了凭据。遵循Google的说明此处,我有创建了一个测试页面,并完全按照上面的链接所述复制了页面代码。



当我运行页面时,我最初看到一个授权按钮,它让我登录进入我的帐户。到目前为止,一切都很好。但是,一旦我登录到Google,我收到以下错误:

 {error:{code: 400,
消息:未找到客户端项目。 ,
status:INVALID_ARGUMENT,
details:[{@type:type.googleapis.com/google.rpc.Help,
links:[{description:Google开发者控制台,
url:https://console.developers.google.com
}]
}]
}}

我读过我能找到的最少的东西,提到这个具体的错误。



任何人遇到这个错误,或者有什么想法?



谢谢!

解决方案

嗯,解决了它!

对于新的Google API,您需要在开发者控制台中启用API。



转至: https://console.developers.google.com



在列表中找到您要使用的API(对于我来说,它是Sheets API) ,点击它并启用它。



它现在像一个魅力: - )


This is my first time diving into Google API's. I'm trying to get a simple test working following the Google instructions. At this point, I've created the project and set up credentials. Following Google's instructions here, I have created a test page and copied the page code exactly as stated on the above link.

When I run the page, I initially see an authorize button, which asks me to log into my account. Everything up to this point is fine. However, once I log in to Google, I receive the following error:

"{"error": {"code": 400,
            "message": "Client project not found. Please pass a valid project.",
            "status": "INVALID_ARGUMENT",
            "details": [{"@type": "type.googleapis.com/google.rpc.Help",
                         "links": [{"description": "Google developers console",
                                    "url": "https://console.developers.google.com"
                                  }]
                       }]
 }}"

I've read what little I can find, and nothing mentions this specific error.

Anyone encounter this error, or have any ideas?

Thanks!

解决方案

Ah, solved it!

For the new Google API's, you need to enable the API in the developer console.

Go to: https://console.developers.google.com

In the list, find the API you want to use (for me it was Sheets API), click on it and Enable it.

It now works like a charm :-)

这篇关于Google API错误400:“未找到客户项目”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆