Skip to main content

Get Hosts of target channel

Description

This endpoint returns a "host" record for each channel hosting the channel with the provided targetId. It does not return the login of the target, only of the hosts. Therefore getTargetLogin will return null for each Host in HostList.getHosts().

warning

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

Method Definition

@RequestLine("GET /hosts?include_logins=1&target={id}")
HystrixCommand<HostList> getHostsOf(
@Param("id") String targetId
);

Required Parameters

NameTypeDescription
targetIdtextThe user ID of the channel for which to get host information.

Optional Parameters

None

Code-Snippets

HostList hosts = twitchClient.getMessagingInterface().getHostsOf("29829912").execute();
hosts.getHosts().forEach(host -> {
System.out.println(host.getHostDisplayName());
});