Skip to content

Instantly share code, notes, and snippets.

fxyw /
Last active May 27, 2021 20:02 — forked from ikai/
Very simple Python sample to generate a refresh token for the YouTube API. Note that this will will also create a file called that contains this information.
import httplib2
import os
import sys
from apiclient.discovery import build
from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client import tools