Google API Error 400: “Client project not found”

白昼怎懂夜的黑 提交于 2019-12-19 05:22:23

问题


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!


回答1:


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 :-)



来源:https://stackoverflow.com/questions/37469372/google-api-error-400-client-project-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!