# How to set user's location string with Discourse API

**URL:** <https://meta.discourse.org/t/how-to-set-users-location-string-with-discourse-api/146301>\
**Category:** Development\
**Created:** [March 31, 2020, 3:43pm UTC](https://meta.discourse.org/t/how-to-set-users-location-string-with-discourse-api/146301 "2020-03-31T15:43:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pnoeric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnoeric/32/177144_2.png) [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Post date:** [April 1, 2020, 3:27pm UTC](https://meta.discourse.org/t/how-to-set-users-location-string-with-discourse-api/146301/3 "2020-04-01T15:27:03Z")

</div>

Thanks Jeff, that was what I needed… being able to spy on the XHR requests directly is clever!

For others who might need the info: I was able to PUT to `/u/username.json` and update the custom fields that way. And it appears you can only make the call with a username, not with a user ID (too bad).

---

_[View the full topic](https://meta.discourse.org/t/how-to-set-users-location-string-with-discourse-api/146301)._
