Get who a channel is hostin

Is there some hidden API to get who one person is hosting? I know one unlisted API that gets a list of people you follow who are hosting someone, but that’s a large list and I’m not sure I can filter it.

Never mind, I have found the solution: Host Mode in Kraken API?

I’m using a little, nasty bash script (it’s still using v3, didn’t update it to v5). maybe it’s a better solution for you:

#!/bin/bash
id=$(curl -s -H ‘Accept: application/vnd.twitchtv.v3+json’ -H ‘Client-ID: XXX’ -X GET “https://api.twitch.tv/kraken/channels/$1” | jq -r ‘._id’)
hoster=$(curl -s “http://tmi.twitch.tv/hosts?include_logins=1&target=$id” | jq -r ‘.hosts .host_display_name’ | sed ‘:a;N;$!ba;s/\n/, /g’)

if [[ -z $hoster ]]; then
echo $1 not hosted by anyone.
else
echo $1 is beeing hosted by $hoster
fi

You use it: ./twitch_host.sh tsm_dyrus

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