Attempting to see if user is streaming! - 401 Error

Heya, so im trying to make a system where if the user is live a message will pop up.

(This is on Roblox btw) I have no idea what im doing wrong but its sending back 401 - unauthorized.

unauthorize

There is no “client-secret” header.

You need to use your clientID and clientSecret to generate an App Access token and send an Authorization header

So how would I do that? There are no code examples in the post you linked. (Unless im blind or something.)

First you need to decide if App Access is the right type for you

Otherwise it’s covered here

Where can I find “client_credentials”?

What do you mean?

client_credentials is the value for grant_type in this type of oAuth loop

What do I put for “client_Credentials” is what im asking.

POST https://id.twitch.tv/oauth2/token
    ?client_id=<your client ID>
    &client_secret=<your client secret>
    &grant_type=client_credentials

The value is client_credentials, that is what you put there

So I put my client_id and client_secret again? (Im new to this so idk)

That is correct

So, like this? “https://id.twitch.tv/oauth2/token?client_id=id&client_secret=id&grant_type=client_id=id&client_secret=id

No

POST https://id.twitch.tv/oauth2/token
    ?client_id=<your client ID>
    &client_secret=<your client secret>
    &grant_type=client_credentials

Like that

I am so confused right now.

POST https://id.twitch.tv/oauth2/token
?client_id=id
&client_secret=id
&grant_type=client_id&client_secret

Like that?

No

Grant_type needs to be the words client_credentials

https://id.twitch.tv/oauth2/token
    ?client_id=asdfasdfasdfasdffdsa
    &client_secret=asdfadsfasdfadsffsd
    &grant_type=client_credentials

where asdf is gibberish

OH, ok, that makes alot more sense.

Now I am getting error 400.
nowiam
(Keep in mind this is roblox!)

When I do “GET” instead of “POST” it gives me a 404 error.

For this request it needs to be form data, or query string, not headers

So how would I do that? Would it be like “https://id.twitch.tv/oauth2/token?client_id=id&client_secret=id&grant_type=client_credentials”?

that would be valid yes

Still giving me 400 replies even though im using a url…