# Invalid OAuth token, but have it

**URL:** <https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103>\
**Category:** API\
**Created:** [April 13, 2023, 10:14am UTC](https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103 "2023-04-13T10:14:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Vodorez](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/alexander_vodorez/32/24121_2.png) [@Alexander\_Vodorez](https://staging-discuss.dev.twitch.com/u/Alexander_Vodorez)\
**Post date:** [April 13, 2023, 10:14am UTC](https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103/1 "2023-04-13T10:14:47Z")

</div>

Hello everyone!  
Can you advise me.  
I created a twitch profile for development.  
Got a token and a client\_id. Naturally I tried to make a request, but I always get the error “Invalid OAuth token (401)”.  
I created a “developer application” and how did not try all the time the error ☹

 ![photo_2023-04-13_12-58-11](https://d2spem0quai2ol.cloudfront.net/original/3X/2/4/2442b224b6ad66588a7409a8acd4dea68e24362b.jpeg)

---

<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:** [April 13, 2023, 10:15am UTC](https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103/2 "2023-04-13T10:15:39Z")

</div>

This sounds like you a client id and a client secret and tried to use the client secret as a token.

A client secret is not a token

Please refer to the authentication documentation to determine which kind of token you need and then generate said token

> **[Authentication](https://dev.twitch.tv/docs/authentication/)**
>
> Authentication

---

<div class="post-metadata">

**Author:** ![Alexander\_Vodorez](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/alexander_vodorez/32/24121_2.png) [@Alexander\_Vodorez](https://staging-discuss.dev.twitch.com/u/Alexander_Vodorez)\
**Post date:** [April 13, 2023, 10:24am UTC](https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103/3 "2023-04-13T10:24:47Z")

</div>

Thank you very much!  
You were right, I didn’t have a token.  
Now it is formed and ready 🙂

---

<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:** [May 13, 2023, 10:25am UTC](https://staging-discuss.dev.twitch.com/t/invalid-oauth-token-but-have-it/45103/4 "2023-05-13T10:25:45Z")

</div>

Closed on May 13, 2023, 10:25am UTC

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