# Utiliser l'API pour récupérer la valeur d'un champ utilisateur personnalisé

**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:** [Avril 6, 2018, 7:58 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:** 1
**Showing post:** 2

<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: [Avril 7, 2018, 7:22 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.

---

_[View the full topic](https://meta.discourse.org/t/using-the-api-to-retrive-the-value-of-a-custom-user-field-from-a-user/84751)._
