I’m trying to get the user_ID of a famous streamer on twitch cause I’m creating a bot on Telegram that should notify to the group chat when his streaming goes live. I’ve created an app from glass.twitch.tv and now I’m wondering what to do.
{"error":"Unauthorized","status":401,"message":"Must provide a valid Client-ID or OAuth token"}
I’ve tried more times: the first time I didn’t insert mine Client_ID into the Header, then the second one I’ve filled the header sain Client_ID = myclientid but both times I’ve received that error.
For an example. You are not sending a header correctly, and can’t tell you how to fix that since you didn’t provide what language you are using or sample code.
See also
curl -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/helix/streams?first=20'
I’m currently using a website called API Tester to apply these request to the twitch servers, that’s why I didn’t post any code. Did you understand that I’m doing it without the streamer login infos and also without any information of his twitch account apart of the nome of his channel? Cause I don’t know why but I feel that you didn’t.
Any thoughts?
In this picture where you see
`-X GET https://api.twitch.tv/kraken/users?login=dallas,dallasnchains`
what this “dallas,dallasnchains” means? Like if I want to check the xxx user_ID do I have to write xxx instead of dallas,dallasnchains ?
You can’t seperate the users by a coma. they each need to have ‘login=’ or ‘id=’
A request can include a mixture of login names and user ID. If specifying multiple values (any combination of id and/or login values), separate them with ampersands; e.g., GET https://api.twitch.tv/helix/users?login=<login name>&id=<user ID>... GET https://api.twitch.tv/helix/users?id=<user ID>&id=<user ID>...GET https://api.twitch.tv/helix/users?login=<login name>&login=<login name>...
Ok, now I’m wondering which is the correct link to see when he goes on live? Cause I’ve searched into the link that BarryCarlyon has sent (the second one) and there are only ways to get lists of most watched streamer.
So now I’m searching for the request to see when he’s in live.
I’m building a script that send the GET request every x minutes, does Twitch have a cooldown time?
What the best range of time to wait between one request and the next one?
I am not aware of the cool down times for the API, However, you should not have any issues hitting the limit. There are projects that hit it up to once every second and still don’t hit the limit.