Skip to content

8bitkick/ArduinoGoogleAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoGoogleAPI

Overview

Google API access on Arduino by implementing Google's OAuth 2.0 for Limited-Input Device Applications. Limited API scopes are available under this method

See - https://developers.google.com/identity/protocols/OAuth2ForDevices#allowedscopes

Created for Arduino MKR1000 with WiFi.

Set up

You will need to set up your application & access scopes by following the steps Google provide below.

https://developers.google.com/identity/protocols/OAuth2ForDevices

The authorization credentials for your app generated by Google, your WiFI SSID and password should be defined in the sketch (these are labelled _SECRET in the code) . Ideally define them in a seperate file to include, Secrets.h. In Arduino Create you can just edit them directly Secrets tab.

Default scope is allowing access to user files on Google Drive - but only files the app creates

https://developers.google.com/drive/v2/reference/#Files

The sketch uses SSH. You may also need to add certificates to your Arduino wifi module for google.com and googleapis.com domains. This can be done using the Firmware Updater tool

https://www.arduino.cc/en/Tutorial/FirmwareUpdater

Usage

Arduino gives you an activation code in console

You could also show on LCD display, etc.

alt text

User grants access in a web browser

alt text

Arduino can now call Google APIs

Default scope is allowing access to user files on Google Drive - but only files the app creates

https://developers.google.com/drive/v2/reference/#Files

Releases

No releases published

Packages

No packages published

Languages