# I need OAUTH just to get the user ID of a user?

**URL:** <https://discuss.dev.twitch.com/t/i-need-oauth-just-to-get-the-user-id-of-a-user/27192>\
**Category:** API\
**Created:** [July 19, 2020, 4:45am UTC](https://discuss.dev.twitch.com/t/i-need-oauth-just-to-get-the-user-id-of-a-user/27192 "2020-07-19T04:45:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightlyBuilds](https://avatars.discourse-cdn.com/v4/letter/n/e274bd/32.png) [@nightlyBuilds](https://discuss.dev.twitch.com/u/nightlyBuilds)\
**Post date:** [July 19, 2020, 4:45am UTC](https://discuss.dev.twitch.com/t/i-need-oauth-just-to-get-the-user-id-of-a-user/27192/1 "2020-07-19T04:45:58Z")

</div>

There is no way this makes sense, so I must be missing something. Using v5 like “[https://api.twitch.tv/helix/users?(username](https://api.twitch.tv/helix/users?(username))” works with client ID, but using helix asks for an OAUTH. How can I get the publicly available information of a user like their stream status, their bio, and their profile image without OAUTH (using the new API)?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [July 19, 2020, 11:45am UTC](https://discuss.dev.twitch.com/t/i-need-oauth-just-to-get-the-user-id-of-a-user/27192/2 "2020-07-19T11:45:09Z")

</div>

You can’t do it without oAuth.

You must use an access token.

Generally the most applicable is a Server to Server aka App Access Token

> **[Getting OAuth Access Tokens](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/)**
>
> Getting OAuth Access Tokens

That allows you to automatically get a token without user intervention (or user login). So your frontend calls your backend and your backend users the token and calls the Twitch API

Tokens being passwords and tokens that don’t belong to the logged in users shouldn’t be leaked

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [August 18, 2020, 11:45am UTC](https://discuss.dev.twitch.com/t/i-need-oauth-just-to-get-the-user-id-of-a-user/27192/3 "2020-08-18T11:45:15Z")

</div>

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