I tried to get streams information and it requires the channel ID. I have this one when I ask a user to be authenticated using the oauth2 process / token etc.
But in case I don’t have this user coming, I would like to retrieve some public information.
Here is the stream route : GET https://api.twitch.tv/kraken/streams/
Someone already asked about it here : Get channel_id by user_id or display_name but the response didn’t work at all, I can’t use the displayed channel name or username (even if it looks the same) to get the information. I even tried to get channel public information using the displayed_name, same following error:
(trying to get info with my channel)
GET https://api.twitch.tv/kraken/channels/elynia_gaming
{
“error”: “Bad Request”,
“status”: 400,
“message”: “Channel identifier “elynia_gaming” is in an invalid format”
}
(While I’m at it, for future use by either yourself or someone who comes here at a later point, I might aswell say that for the v5 use, you can also get multiple channels returned using https://api.twitch.tv/kraken/users?login=<channelName>,<channelName2>,<channelName3> … etc etc)
Hope I’ve been of some help!
edit: Fixed link terms not being visible
edit2+3: Accidentally put channel?channels instead of users?login … twice
And another way I just found,
I have to retrieve an App access tokens beside of my User access token and then request the channel to get the ID. It’s longer than your answer but maybe having the right (token) will give me more ressources ? Don’t know yet
The app access tokens are mainly relevant for the new Helix API, as with a client id only you’re limited to 30 requests a minute where as if you use an OAuth token you can make 120 requests per minute. The app access token is just a way to have an OAuth token to use for endpoints that require no authentication.