LoreSchaeffer
LoreSchaeffer

Reputation: 123

Youtube API, key not working

I'm using Google API to develop a web app, to do this I need to interact with youtube and get the channel ID. According to google documentation I use this request

https://www.googleapis.com/youtube/v3/search?part=snippet&q=LorenzoSchaeffer&type=channel&key={YOUR_API_KEY}

where in "YOUR_API_KEY" I copy and paste my API Key found in the google developer console. but I get this response

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "keyInvalid",
    "message": "Bad Request"
   }
  ],
  "code": 400,
  "message": "Bad Request"
 }
}

while from google API explorer I get the correct output. I don't know how to proceed, any solution?

Upvotes: 1

Views: 11292

Answers (1)

mattcarrollcode
mattcarrollcode

Reputation: 3469

This means either you're using the wrong API key or the API project that "owns" the API key you are using doesn't have the YouTube Data v3 API hasn't been activated for use with the project.

Go here for information on how to get started, get and API key (make sure to get an API key and not OAuth credentials): https://developers.google.com/youtube/v3/getting-started

Upvotes: 2

Related Questions