# Get customer email

**URL:** <https://community.shopify.dev/t/get-customer-email/10040>\
**Category:** Extensions\
**Tags:** customer-account-ext\
**Created:** [March 4, 2025, 10:21pm UTC](https://community.shopify.dev/t/get-customer-email/10040 "2025-03-04T22:21:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![devin](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/devin/32/4577_2.png) [@devin](https://community.shopify.dev/u/devin)\
**Post date:** [March 4, 2025, 10:21pm UTC](https://community.shopify.dev/t/get-customer-email/10040/1 "2025-03-04T22:21:39Z")

</div>

I am trying to access customer email from customer-account-ui-extension via the following

```auto
const getCustomerEmailQuery = {
      query: `query {
        customer {
          emailAddress {
            emailAddress
          }
        }
      }`
    }
    fetch('shopify://customer-account/api/2024-10/graphql.json', {

```

and am experiencing: `Access denied for customer field. Required access: customer_read_customers access scope.`

which I went ahead and included in toml

```auto
[access_scopes]
scopes = "customer_read_customers"

```

but it’s not working? Is this the best way to approach getting logged in user email?

 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/b/b7f5524cfe9b67d93191113a8ff447291d1e94c6.png)

---

<div class="post-metadata">

**Author:** ![curzey](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/curzey/32/7190_2.png) [@curzey](https://community.shopify.dev/u/curzey)\
**Post date:** [March 4, 2025, 10:37pm UTC](https://community.shopify.dev/t/get-customer-email/10040/2 "2025-03-04T22:37:39Z")

</div>

Hi!

Which toml file did you add it to? `shopify.app.toml` or` shopify.extension.toml`?

If it doesnt show in the app backend dashboard, it seems like it’s either missing from the correct toml file, or you forgot to deploy the app with `shopify app deploy`.

---

<div class="post-metadata">

**Author:** ![devin](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/devin/32/4577_2.png) [@devin](https://community.shopify.dev/u/devin)\
**Post date:** [March 4, 2025, 10:49pm UTC](https://community.shopify.dev/t/get-customer-email/10040/3 "2025-03-04T22:49:32Z")

</div>

Thanks curzey. I have applied the change to `shopify.extension.toml` and I have not deployed. This is in dev store (i.e., `shopify app dev`) so I thought permissions would be easier. Is `shopify app deploy` necessary?

Edit: after updating `extension.toml` and deploying, nothing is changed sadly. Both `.toml` files have access\_scopes defined but `shopify app deploy` does nothing. I wonder if it is because of the info displayed when deploying:

```auto
New version created, but not released. 
Network access must be requested and approved in order for this extension to be published

```

---

<div class="post-metadata">

**Author:** ![devin](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/devin/32/4577_2.png) [@devin](https://community.shopify.dev/u/devin)\
**Post date:** [March 4, 2025, 11:38pm UTC](https://community.shopify.dev/t/get-customer-email/10040/4 "2025-03-04T23:38:43Z")

</div>

I tracked it down. Needed to grant network access in `partners.shopify.com` in addition to tweaking `shopify.app.toml` and deploying

 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/e/eec22a2e9d31e0e2cf80daf06e1d18fcaae99a8e.png)

Sadly this hasn’t solved the problem. I’m still getting  
`Access denied for customer field. Required access: `customer\_read\_customers` access scope.`

---

<div class="post-metadata">

**Author:** ![devin](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/devin/32/4577_2.png) [@devin](https://community.shopify.dev/u/devin)\
**Post date:** [March 5, 2025, 12:59am UTC](https://community.shopify.dev/t/get-customer-email/10040/5 "2025-03-05T00:59:33Z")

</div>

The step that I was missing was to re-install the app 🤦‍♂️. Need to make sure to click install when previewing so that new changes are available. With that the request succeeds.

 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/5/53e46ee2ff2de3ed3612bd562522b8e0522af627.png)

---

<div class="post-metadata">

**Author:** ![kyle\_liu](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/kyle_liu/32/14392_2.png) [@kyle\_liu](https://community.shopify.dev/u/kyle_liu)\
**Post date:** [March 5, 2025, 1:34am UTC](https://community.shopify.dev/t/get-customer-email/10040/6 "2025-03-05T01:34:40Z")

</div>

Hi @devin

You can try this

**npm run deploy**

---

<div class="post-metadata">

**Author:** ![curzey](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/curzey/32/7190_2.png) [@curzey](https://community.shopify.dev/u/curzey)\
**Post date:** [March 5, 2025, 6:38am UTC](https://community.shopify.dev/t/get-customer-email/10040/7 "2025-03-05T06:38:48Z")

</div>

Glad you found it. Have been in a likely situation before. I just forgot to actually open the app and accept new access scopes to finally grant it 😅
