Skip to content

robbywashere-zz/gmail-app-oauth-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”‘ Gmail OAuth App Flow πŸ”“βž‘οΈβœ‰οΈ

Motiviation

An example app to get you started on a google api cli app.

You could very well run this once in order to get your access and refresh token, or you could modify the code a bit and integrate it into your own app.

This example follows the recommendations of 'Option 2: Loopback IP address (macOS, Linux, Windows desktop)' listed on OAuth 2.0 for Mobile & Desktop Apps

[OAuth Flow] ---> [Loopback Redirect URI] ---> [Fetch Credentials] ---> [Output to Stdout]

Install

  • git clone https://github.com/robbywashere/gmail-app-oauth-flow

  • Follow the Prerequisites on googles developer portal.

  • Download the credentials from 'Prerequisites' instructions into gmail-app-oauth-flow root directory as .config.json

Run

  • Run node main.js > .tokens.json

  • A browser window prompting you for an google auth flow (should) will pop-up

  • Complete auth, now .tokens.json will contain your token data

Notes

  • Compatible on node 9+

About

βœ‰οΈ an example app to get you started on a google api cli app.πŸ”“

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published