# How to get email id as a part of token

**URL:** <https://community.auth0.com/t/how-to-get-email-id-as-a-part-of-token/6291>\
**Category:** Get Help\
**Tags:** scopes\
**Created:** [April 20, 2017, 9:09am UTC](https://community.auth0.com/t/how-to-get-email-id-as-a-part-of-token/6291 "2017-04-20T09:09:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmpooja](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bmpooja](https://community.auth0.com/u/bmpooja)\
**Post date:** [April 20, 2017, 9:09am UTC](https://community.auth0.com/t/how-to-get-email-id-as-a-part-of-token/6291/1 "2017-04-20T09:09:52Z")

</div>

Hi,

How do I get the email address as a part of the Token in the response, it does not have it, and somewhere in the documentation it says to Use scopes but I am not getting a reference on how to use it

I am using Google V7  
auth0.login({  
connection: ‘google-oauth2’,  
}, function(err) {  
if (err) alert("something went wrong: " + err.message);  
});

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 20, 2017, 9:50am UTC](https://community.auth0.com/t/how-to-get-email-id-as-a-part-of-token/6291/2 "2017-04-20T09:50:56Z")

</div>

To retrieve the email as part of the token, you need to specify the `email` scope:

```
auth0.login({
       connection: 'google-oauth2', 
       scope: 'openid email'
     }, 
     function(err) { 
        if (err) alert("something went wrong: " + err.message); 
     });

```

This is outlined in the Auth0js docs: [Auth0.js v9 Reference](https://auth0.com/docs/libraries/auth0js/v7)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/how-to-get-email-id-as-a-part-of-token/6291/3 "2018-03-02T05:53:23Z")

</div>


