Get Hosted channel name


#1

Hi,

I am currently looking for a way to get the the name or ID of a channel being hosted on some other channel.

Since I need this API to work in a browser the unofficial API that I found reference to on the forum:
https://tmi.twitch.tv/hosts?include_logins=1&host=149747285
is not working for me because of CORS.

Is there any other way to do this?

Thank you.


#2

All of the host stuff is basically undocumented so whatever you find that works works and if it doesn’t doesn’t. Hence the no cors :smiley:


#3

It’s not the API but with IRC you got : tmi.twitch.tv HOSTTARGET #<channel> :<hosted_channel_name> when you connect on the channel.


#4

That’s for outbound hosts, not inbound hosts


#5

So, there is no way we can access this info using something like:

https://api.twitch.tv/kraken/users/...
https://api.twitch.tv/kraken/channels/...
https://api.twitch.tv/kraken/streams/...

Documented or not.


#6

The hosts endpoint is sorta duplicated on

https://api.twitch.tv/kraken/channels/TwitchID/hosts

but

https://tmi.twitch.tv/hosts?include_logins=1&target=TWITCHID

is a little more useful

But again, it’s not a documented endpoint. There are no documented/supported endpoints to fetch host data over the API at this time. Which means it can break or change at any time