# Zoek gebruikers-id op aan de hand van gebruikersnaam of e-mailadres

**URL:** <https://meta.discourse.org/t/lookup-user-id-from-username-or-email-address/198638>\
**Category:** Development\
**Created:** [30 juli 2021 om 01:08 UTC](https://meta.discourse.org/t/lookup-user-id-from-username-or-email-address/198638 "2021-07-30T01:08:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![uckelman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uckelman/32/103854_2.png) [@uckelman](https://meta.discourse.org/u/uckelman)\
**Post date:** [30 juli 2021 om 09:46 UTC](https://meta.discourse.org/t/lookup-user-id-from-username-or-email-address/198638/3 "2021-07-30T09:46:05Z")

</div>

I’m aware I can lookup users vai the JSON API, but as I’m doing this from Ruby that Discourse is running itself, wouldn’t it be more straightforward to call the function I need directly rather than mess with a call to the JSON API? Is that really the recommended way to do this? I see no use of the JSON API anywhere else in the importers I’ve looked at.

---

_[View the full topic](https://meta.discourse.org/t/lookup-user-id-from-username-or-email-address/198638)._
