🐛 Add the right scopes to Gmail service account authentication. (#1481)

* fix: request gmail scope instead of books

*  Small improvement to #1427

*  Add svg logo

Co-authored-by: Josh <jojo.parillon@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-02-28 11:27:52 -05:00
committed by GitHub
parent 402da3d53e
commit 725b3eb408
4 changed files with 18 additions and 3 deletions

View File

@@ -216,7 +216,12 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
//https://developers.google.com/identity/protocols/oauth2/service-account#httprest
const scopes = [
'https://www.googleapis.com/auth/books',
'https://www.googleapis.com/auth/gmail.labels',
'https://www.googleapis.com/auth/gmail.addons.current.action.compose',
'https://www.googleapis.com/auth/gmail.addons.current.message.action',
'https://mail.google.com/',
'https://www.googleapis.com/auth/gmail.modify',
'https://www.googleapis.com/auth/gmail.compose',
];
const now = moment().unix();