13

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!

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Andrew R.
  • 285
  • 3
  • 12

1 Answers1

37

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

kris
  • 386
  • 3
  • 2
  • Needed this for knowledge api. Why this isn't listed in the [docs](https://developers.google.com/knowledge-graph/prereqs) is beyond me. Thanks so much! – Bahrom Jan 13 '17 at 20:49
  • 2
    I needed to enable the Google+ API as part of authentication. Thanks! – Matthew White Mar 28 '17 at 17:18
  • At least now the error is more helpful: 'Project 999999999 is not found and cannot be used for API calls. If it is recently created, enable Google+ API by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=999999999 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.' – eflat Oct 14 '17 at 23:37