Skip to main content

Get Hosts

Description

This endpoint returns a "host" record for each channel ID provided. If the channel is not hosting anyone, the target_id and target_login fields will not be present.

warning

Twitch removed host mode in October 2022, rendering this endpoint as decommissioned.

Method Definition

@RequestLine("GET /hosts?include_logins=1&host={id}")
HystrixCommand<HostList> getHosts(
@Param("id") List<String> channelIds
);

Required Parameters

NameTypeDescription
channelIdstextA list containing a user ID for each channel to check.

Optional Parameters

None

Code-Snippets

HostList hosts = twitchClient.getMessagingInterface().getHosts(Arrays.asList("29829912")).execute();
hosts.getHosts().forEach(host -> {
System.out.println(host.getHostDisplayName() + " hosting " + host.getTargetDisplayName());
});