Hello,
Is there a Twitch API I can use to create a custom $readapi command in Ankhbot to see who is hosting me?
Thank you
Unsupported API - which means Twitch does not support it and may remove/change it at any time - where you must provide chanelID which is not your channel name:
https://tmi.twitch.tv/hosts?include_logins=1&target=channelID
This returns a JSON payload with data. I do not have the format right in front of me, so you would need to have your channel hosted and pull the data (or pull from another channel being hosted). Please note that the API may be several minutes behind the actual hosting event due to caching and other factors. Additionally, I am not familiar with Ankhbot and have no idea if it has the ability to parse a JSON payload or not.
Above I indicated that you need your channelID, you get your channelID from the following API, retrieve the _id value:
https://api.twitch.tv/kraken/channels/yourChannelName
thank you for the reply!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.