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
Name | Type | Description |
---|---|---|
authToken | string | User Access Token (scope: channel:read:stream_key) |
broadcasterId | string | User ID of the broadcaster |
Optional Parameters
None
Code-Snippets
print stream key
- Java
- Kotlin
- Groovy
StreamKeyList resultList = twitchClient.getHelix().getStreamKey(authToken, broadcasterId).execute();
resultList.getKeys().forEach(key -> {
System.out.println(key);
});
val resultList = twitchClient.helix.getStreamKey(authToken, broadcasterId).execute()
resultList.keys.forEach { key ->
println(key)
}
def resultList = twitchClient.helix.getStreamKey(authToken, broadcasterId).execute()
resultList.keys.each { key ->
System.out.println key
}