Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get current Users Email ID in GMAIL ADDONS

I am learning to make gmail addons. But I am stuck at a point on how to access email address value of user who using addons.

After Reading I get that I will need this permission https://www.googleapis.com/auth/userinfo.email

But how to actually get email address when user opens addon in Gmail

Please can anybody help me on this

like image 374
Sandeep Chikhale Avatar asked Mar 07 '23 08:03

Sandeep Chikhale


1 Answers

This seems to work:

var emailAddress = Session.getEffectiveUser().getEmail();
like image 69
Glen Little Avatar answered Mar 16 '23 20:03

Glen Little