- Node.js
- Clone this repository
- cd into the directory
- Run
npm install
- Create new project in Google Cloud Platform
- Configure OAuth consent screen
- Create OAuth client ID of type "Desktop app"
- Add Gmail API to the project
- Download credential as JSON and save it as
client_secret.json
in the root directory of this project - Change the
redirect_uri
inclient_secret.json
tohttp://localhost:3000/oauth2callback
- Run
npm start