Skip to content

Instantly share code, notes, and snippets.

@ando9527
ando9527 / youtube-api.js
Created February 3, 2019 03:59
Youtube API v3 Example
const fs = require('fs');
const readline = require('readline');
const { google } = require('googleapis');
// If modifying these scopes, delete token.json.
const SCOPES = ['https://www.googleapis.com/auth/youtube.force-ssl'];
// The file token.json stores the user's access and refresh tokens, and is
// created automatically when the authorization flow completes for the first
// time.
const TOKEN_PATH = 'youtube_token.json';