# GET helix/users Responds with 400 when trying to get user information based on token

**URL:** <https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687>\
**Category:** API\
**Created:** [February 8, 2022, 4:03pm UTC](https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687 "2022-02-08T16:03:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrik](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/patrik/32/16846_2.png) [@patrik](https://staging-discuss.dev.twitch.com/u/patrik)\
**Post date:** [February 8, 2022, 4:03pm UTC](https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687/1 "2022-02-08T16:03:07Z")

</div>

According to the [documentation](https://dev.twitch.tv/docs/v5/reference/users#get-user), one should be able to fetch user information based on the OAuth token provided. However, the API keeps responding with “Must provide an ID, Login or OAuth Token.”.

Example:

```auto
curl -X GET https://api.twitch.tv/helix/users -H 'Authorization: Bearer ry...90' -H 'Client-Id: 1w...b8'

```

```auto
{"error":"Bad Request","status":400,"message":"Must provide an ID, Login or OAuth Token."}

```

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [February 8, 2022, 4:04pm UTC](https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687/2 "2022-02-08T16:04:21Z")

</div>

This suggests taht the oAuth token is not a user token

It’s client credentials instead, and this doesn’t have a user attached to it.

Or the token has expried.

You can use the [validate endpoint](https://dev.twitch.tv/docs/authentication#validating-requests) or this example tool [Twitch | Token Checker](https://barrycarlyon.github.io/twitch_misc/examples/token_checker/) to test the token

So you asked it to get the user for that token but the token is the wrong type

---

<div class="post-metadata">

**Author:** ![patrik](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/patrik/32/16846_2.png) [@patrik](https://staging-discuss.dev.twitch.com/u/patrik)\
**Post date:** [February 8, 2022, 4:06pm UTC](https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687/3 "2022-02-08T16:06:47Z")

</div>

Thank you for the quick response!  
That validation link will undoubtedly save me time in debugging this.

---

<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:** [March 10, 2022, 4:06pm UTC](https://staging-discuss.dev.twitch.com/t/get-helix-users-responds-with-400-when-trying-to-get-user-information-based-on-token/36687/4 "2022-03-10T16:06:49Z")

</div>

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