Skip to main content

Streams - Get Key

Description

Gets the channel stream key for a user.

Method Definition

@RequestLine("GET /streams/key?broadcaster_id={broadcaster_id}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<StreamKeyList> getStreamKey(
@Param("token") String authToken,
@Param("broadcaster_id") String broadcasterId
);

Required Parameters

NameTypeDescription
authTokenstringUser Access Token (scope: channel:read:stream_key)
broadcasterIdstringUser ID of the broadcaster

Optional Parameters

None

Code-Snippets

StreamKeyList resultList = twitchClient.getHelix().getStreamKey(authToken, broadcasterId).execute();
resultList.getKeys().forEach(key -> {
System.out.println(key);
});