Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Carlos Fructuoso analistacarlosh

🎯
Focusing
View GitHub Profile
@analistacarlosh
analistacarlosh / submit.md
Created Jan 25, 2021 — forked from tanaikech/submit.md
Retrieving Access Token From OneDrive using Google Apps Script
View submit.md

Retrieving Access Token From OneDrive using Google Apps Script

Overview

This GAS sample is for retrieving access token to use OneDrive APIs using Google Apps Script.

In this script, the authorization code is automatically retrieved.

Demo

@analistacarlosh
analistacarlosh / submit.md
Created Jan 25, 2021 — forked from tanaikech/submit.md
Uploading Files to OneDrive Using Node.js
View submit.md

Upload contents for an item on OneDrive

In order to use this script, please retrieve client id, client secret and refresh token before. About this, you can see the detail information at https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc.

1. Simple item upload

This is for the simple item upload is available for items with less than 4 MB of content. The detail information is https://dev.onedrive.com/items/upload_put.htm.

var fs = require('fs');
var mime = require('mime');
var request = require('request');