# Get user ID by username (v5)

**URL:** <https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783>\
**Category:** API\
**Created:** [January 8, 2017, 11:34pm UTC](https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783 "2017-01-08T23:34:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![breon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/breon/32/1942_2.png) [@breon](https://staging-discuss.dev.twitch.com/u/breon)\
**Post date:** [January 8, 2017, 11:34pm UTC](https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783/1 "2017-01-08T23:34:15Z")

</div>

Today, with v3, you can get user ID using username.

`https://api.twitch.tv/kraken/users/breonnagy` will return `"_id": 51852120`

However, in v5 you have to use user id to get the user object. How can you get the user ID if you only have the username?

---

<div class="post-metadata">

**Author:** ![Muddr](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/muddr/32/1877_2.png) [@Muddr](https://staging-discuss.dev.twitch.com/u/Muddr)\
**Post date:** [January 8, 2017, 11:40pm UTC](https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783/2 "2017-01-08T23:40:55Z")

</div>

This shows an example to get the user id from a user name. [https://dev.twitch.tv/docs/v5/guides/using-the-twitch-api/](https://dev.twitch.tv/docs/v5/guides/using-the-twitch-api/)

---

<div class="post-metadata">

**Author:** ![breon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/breon/32/1942_2.png) [@breon](https://staging-discuss.dev.twitch.com/u/breon)\
**Post date:** [January 8, 2017, 11:56pm UTC](https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783/3 "2017-01-08T23:56:01Z")

</div>

Thanks! I read that page and glossed over the example. 👍

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [February 7, 2017, 11:56pm UTC](https://staging-discuss.dev.twitch.com/t/get-user-id-by-username-v5/8783/4 "2017-02-07T23:56:05Z")

</div>

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