On this page (6)
- https://console.cloud.google.com/
- Menu > IAM & Admin > Create a Project
- enable the Gmail API
- Menu menu > APIs & Services > Credentials. 사용자 인증 정보
- Create Credentials > OAuth client ID.
- Application type > Desktop app.
- Name, Create OAuth client with Client ID & Secret.
- Download
credentials.json and move to working folder.
npm install googleapis @google-cloud/local-auth
node index.js
- Menu menu > APIs & Services > Credentials. 사용자 인증 정보
- Create Credentials > API key.
- Application type > Desktop app.
- Name, Create OAuth client with Client ID & Secret.
- Download
credentials.json and edit .env file.
- run process
- .env
- node generate.js
- node token.js
- node send.js