# "Get a user by id" can't get email

**URL:** https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913
**Category:** Development
**Tags:** rest-api
**Created:** [May 10, 2021, 10:58am UTC](https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913 "2021-05-10T10:58:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Programer-D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/programer-d/32/215194_2.png) [@Programer-D](https://meta.discourse.org/u/Programer-D)
#### Post date: [May 10, 2021, 10:58am UTC](https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913/1 "2021-05-10T10:58:16Z")

</div>

> **[Discourse API Docs](https://docs.discourse.org/#tag/Users/paths/~1admin~1users~1%7Bid%7D.json/get)**

I want to use the “Get a user by id” API to get the email of a user.

I can get the user information, but the email is not included in the response.  
There is also no parameter to be given. Is there any other setting I need to do?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 10, 2021, 11:46am UTC](https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913/2 "2021-05-10T11:46:50Z")

</div>

The email address is available only in the admin/user route. It’s behind an extra click in the ux. You can likely figure it out using [How to reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![Programer-D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/programer-d/32/215194_2.png) [@Programer-D](https://meta.discourse.org/u/Programer-D)
#### Post date: [May 10, 2021, 12:22pm UTC](https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913/3 "2021-05-10T12:22:47Z")

</div>

I understand it perfectly.

I was able to get the email address using /u/:username/emails.json.

Thank you very much for your answer.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 9, 2021, 12:22pm UTC](https://meta.discourse.org/t/get-a-user-by-id-cant-get-email/189913/4 "2021-06-09T12:22:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
