I am trying to do a YouTube search with the Google APIs within Node.
I am using this as somewhat of a tutorial:
https://github.com/google/google-api-nodejs-client/#google-apis-nodejs-client
I have some of the basics working:
var google = require('googleapis');
var YOUTUBE_API_KEY = "--YOUR_API_KEY";
var youtube = google.youtube('v3');
var requests = youtube.search.list({part:'snippet', q: 'cats', maxResults: 10});
When I call this I get this message:
Error: Daily limit for Unauthenticated Used Exceeded.
Now, this is obviously because I'm not using my API key. However, I cannot find any resource out there that shows you how the API key is used for Node.
Anything I find tells me to do something like this:
var YOUTUBE_CLIENT_KEY = '';
var CLIENT_SECRET = '';
var REDIRECT_URL = '/';
var OAuth2 = google.auth.OAuth2;
var oauth2Client = new OAuth2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL);
google.options({auth: oauth2Client});
Followed by my "youtube.search.list...".
The issue with this approach is I have NO idea where to get:
- CLIENT_ID
- CLIENT_SECRET
- REDIRECT_URL
I cannot find any of these anywhere online. I have tried to just follow Javascript tutorials, since Node obviously uses Javascript, although it always requires the oAuth2... which requires the three things above.
Any helps/hints?