Skip to content

Instantly share code, notes, and snippets.

🔔
I may be slow to respond.

Prasath Mani prasathmani

🔔
I may be slow to respond.
  • Bangalore
Block or report user

Report or block prasathmani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prasathmani
prasathmani / upload-to-gdrive.py
Created Jan 19, 2019
upload files to google drive using python
View upload-to-gdrive.py
import requests, json
# Get refresh token from google drive api
# Generating a refresh token for DRIVE API calls using the OAuth playground
# https://www.youtube.com/watch?v=hfWe1gPCnzc
def getToken():
oauth = 'https://www.googleapis.com/oauth2/v4/token' # Google API oauth url
headers = {'content-type': 'application/x-www-form-urlencoded'}
data = {
'grant_type': 'refresh_token',
You can’t perform that action at this time.