You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gmail Service Account dont want authenticate #2860
Hi everyone,
After several long hours, I still cannot use my service account for Gmail. I'm a Google Workspace customer, but whether it's through JWT, OAuth, or other things (some of which the current version no longer supports), nothing helps and I get just errors. I don't really know what to do to be able to access information (via an OAuth client for my account only its walking) on the gmail accounts of my members.
Can I have a (actual) solution ?
Thanks a lot.
PS: sorry for the text pad but it's late and I'm exhausted and quite frustrated with this problem
Hi,
After a lot of research, I found a solution that works (I use the promises):
constcredentials=require("./credentials.json")// File downloaded with the Service Account KeysconstgetGmailAuth=async()=>{constauth=(newgoogle.auth.JWT(credentials.global.client_email,null,credentials.global.private_key,GMAILSCOPES,person))await(newPromise((resolve,reject)=>{auth.authorize((err,tokens)=>{if(err){reject(err);}else{resolve(tokens);}});}))return(auth);}
Activity
NonozgYtb commentedon Dec 12, 2021
Hi,
After a lot of research, I found a solution that works (I use the promises):
Good bye !
frozen-a-b commentedon Jan 28, 2022
Hi @NonozgYtb ,
I think I ran into a similar issue
What is
personin your code?NonozgYtb commentedon Jan 28, 2022
personis a string with an email like :