I downloaded and installed the google apis with npm install googleapis
and now i'm trying to access the api in my node js file with this code:
var google = require('googleapis')
var youtube = google.youtube({version: 'v3', auth: API_KEY})
However, when I try to access the videos object, I always get back null
. Apparently, the youtube object is corrupted because when I stringify it I get this back:
{"_options":{"auth":"*********"},"activities":{},"captions":{},"channelBanners":{},"channelSections":{},"channels":{},"commentThreads":{},"comments":{},"guideCategories":{},"i18nLanguages":{},"i18nRegions":{},"liveBroadcasts":{},"liveStreams":{},"playlistItems":{},"playlists":{},"search":{},"subscriptions":{},"thumbnails":{},"videoAbuseReportReasons":{},"videoCategories":{},"videos":{},"watermarks":{},"google":{"_options":{},"auth":{"_cachedCredential":null}}}
So all of the little "subobjects" are empty. How do I fix this?