# Using the API to retrive the value of a custom user field from a user

**URL:** https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751
**Category:** Development
**Created:** [06.Апрель.2018 19:58:47 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751 "2018-04-06T19:58:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jake\_Green](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jake\_Green](https://meta.discourse.org/u/Jake_Green)
#### Post date: [06.Апрель.2018 19:58:48 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/1 "2018-04-06T19:58:48Z")

</div>

I’ve search the API documentation but I can’t find a way to get the value of a customer user field of a specified user. Is this possible? Thanks.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [07.Апрель.2018 19:22:12 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/2 "2018-04-07T19:22:12Z")

</div>

If you whitelist a user custom field in `public user custom fields` site setting then you can get it in `/u/USERNAME.json` API endpoint.

Else if you whitelist in `staff user custom fields` setting then you can get it in the same API endpoint if you used a staff user’s / global api key.

---

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [16.Декабрь.2019 12:04:19 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/3 "2019-12-16T12:04:19Z")

</div>

Существует ли способ найти или выполнить поиск по номеру мобильного телефона, который пользователь указал в пользовательском поле при входе на сайт или создании учетной записи?

Запрос в [Data Explorer](https://meta.discourse.org/t/32566?silent=true)? Или расширенный поиск или что-то подобное?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [16.Декабрь.2019 19:40:42 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/4 "2019-12-16T19:40:42Z")

</div>

> [@Bathinda](#):
>
> Есть ли запрос к [Data Explorer](https://meta.discourse.org/t/32566?silent=true)? Или расширенный поиск или что-то в этом роде?

Думаю, лучший вариант — это запрос к [Data Explorer](https://meta.discourse.org/t/32566?silent=true). Посмотрите второй запрос в этом сообщении: [Query to filter users by sign-up 'custom fields' - #2 by simon](https://meta.discourse.org/t/data-explorer-plugin-filter-users-by-sign-up-custom-fields/100837/2?u=simon_cossar). Он должен предоставить вам нужные данные.

---

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [18.Декабрь.2019 05:29:55 UTC](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751/5 "2019-12-18T05:29:55Z")

</div>

GBU.  
Вы, ребята, действительно, похоже, имеете решение для каждой проблемы.  
Я прочитал всю эту тему, но каким-то образом пропустил связанную ветку.
