Get Extension Bits Products
Gets the list of Bits products that belongs to the extension. The Client ID in the App Access Token identifies the extension.
Endpoint
GEThttps://api.twitch.tv/helix/bits/extensions
Authorization
Requires one of the following:
- An app access token.The client ID in the app access token must be the extension's client ID.
Query Parameters
should_include_allBooleanA Boolean value that determines whether to include disabled or expired Bits products in the response. The default is false.
Response Body
dataObject[]A list of Bits products that the extension created. The list is in ascending SKU order. The list is empty if the extension hasn't created any products or they're all expired or disabled.Hide child attributesShow child attributes
data.skuStringThe product's SKU. The SKU is unique across an extension's products.data.costObjectNullableAn object that contains the product's cost information. Is null if the product doesn't have a cost.Hide child attributesShow child attributes
data.cost.amountIntegerThe product's price.data.cost.typeStringThe type of currency.Possible values
bits
data.in_developmentBooleanA Boolean value that indicates whether the product is in development. If true, the product is not available for public use.data.display_nameStringThe product's name as displayed in the extension.data.expirationStringNullableThe date and time, in RFC3339 format, when the product expires. Is null if the product doesn't expire.data.is_broadcastBooleanA Boolean value that determines whether Bits product purchase events are broadcast to all instances of an extension on a channel. The events are broadcast via the 'onTransactionComplete' helper callback. Is true if the event is broadcast to all instances.
Response Codes
- 200OK
- Successfully retrieved the list of products.
- 400Bad Request
- The ID in the Client-Id header must belong to an extension.
- 401Unauthorized
- The Authorization header is required and must specify an app access token; you may not specify a user access token.
- The OAuth token is not valid.
- The ID in the Client-Id header must match the Client ID in the OAuth token.
curl -X GET 'https://api.twitch.tv/helix/bits/extensions?should_include_all=true' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/bits/extensions?should_include_all=true" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/bits/extensions?should_include_all=true", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/bits/extensions",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"should_include_all": "true",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/bits/extensions?should_include_all=true", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/bits/extensions?should_include_all=true");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/bits/extensions?should_include_all=true");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/bits/extensions?should_include_all=true")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"sku": "1010",
"cost": {
"amount": 990,
"type": "bits"
},
"in_development": true,
"display_name": "Rusty Crate 2",
"expiration": "2021-05-18T09:10:13Z",
"is_broadcast": false
}
]
}Update Extension Bits Product
Adds or updates a Bits product that the extension created. If the SKU doesn't exist, the product is added. You may update all fields except the 'sku' field.
Endpoint
PUThttps://api.twitch.tv/helix/bits/extensions
Authorization
Requires one of the following:
- An app access token.The client ID in the app access token must match the extension's client ID.
Request Body
skuStringRequiredThe product's SKU. The SKU must be unique within an extension. The product's SKU cannot be changed. The SKU may contain only alphanumeric characters, dashes (-), underscores (_), and periods (.) and is limited to a maximum of 255 characters. No spaces.costObjectRequiredAn object that contains the product's cost information.Hide child attributesShow child attributes
cost.amountIntegerRequiredThe product's price.cost.typeStringRequiredThe type of currency.Possible values
bitsThe minimum price is 1 and the maximum is 10000.
display_nameStringRequiredThe product's name as displayed in the extension. The name must be valid UTF-8 and may contain a maximum of 255 bytes.in_developmentBooleanA Boolean value that indicates whether the product is in development. Set to true if the product is in development and not available for public use. The default is false.expirationStringThe date and time, in RFC3339 format, when the product expires. If not set, the product does not expire. To disable the product, set the expiration date to a date in the past.is_broadcastBooleanA Boolean value that determines whether Bits product purchase events are broadcast to all instances of the extension on a channel. The events are broadcast via the 'onTransactionComplete' helper callback. The default is false.
Response Body
dataObject[]A list that contains the product that you added or updated.Hide child attributesShow child attributes
data.skuStringThe product's SKU. The SKU is unique across an extension's products.data.costObjectAn object that contains the product's cost information.Hide child attributesShow child attributes
data.cost.amountIntegerThe product's price.data.cost.typeStringThe type of currency.Possible values
bits
data.in_developmentBooleanA Boolean value that indicates whether the product is in development. If true, the product is not available for public use.data.display_nameStringThe product's name as displayed in the extension.data.expirationStringNullableThe date and time, in RFC3339 format, when the product expires. Is null if the product doesn't expire.data.is_broadcastBooleanA Boolean value that determines whether Bits product purchase events are broadcast to all instances of an extension on a channel. The events are broadcast via the 'onTransactionComplete' helper callback. Is true if the event is broadcast to all instances.
Response Codes
- 200OK
- Successfully created the product.
- 400Bad Request
- The 'sku' field is required.
- The value in the 'sku' field is not valid. The SKU may contain only alphanumeric characters, dashes (-), underscores (_), and periods (.).
- The 'cost' object's 'amount' field is required.
- The value in the 'cost' object's 'amount' field is not valid.
- The 'cost' object's 'type' field is required.
- The value in the 'cost' object's 'type' field is not valid.
- The 'display_name' field is required.
- The value in the 'display_name' field is not valid. The name must be valid UTF-8 and may contain a maximum of 255 bytes.
- The value in the 'expiration' field is not valid. The date and time must be in RFC3339 format.
- The ID in the Client-Id header must belong to the extension.
- 401Unauthorized
- The Authorization header is required and must specify an app access token; you may not specify a user access token.
- The OAuth token is not valid.
- The ID in the Client-Id header must match the Client ID in the OAuth token.
- 429Too Many Requests
- The extension already has the maximum amount of products. You may update the existing products, but you may not add new ones.
curl -X PUT 'https://api.twitch.tv/helix/bits/extensions' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/bits/extensions" `
-Method Put -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/bits/extensions", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.put(
"https://api.twitch.tv/helix/bits/extensions",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("PUT", "https://api.twitch.tv/helix/bits/extensions", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/bits/extensions");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://api.twitch.tv/helix/bits/extensions");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.put("https://api.twitch.tv/helix/bits/extensions")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"sku": "1010",
"cost": {
"amount": 990,
"type": "bits"
},
"in_development": true,
"display_name": "Rusty Crate 2",
"expiration": "2021-05-18T09:10:13Z",
"is_broadcast": true
}
]
}Get Extensions
Gets information about an extension.
Endpoint
GEThttps://api.twitch.tv/helix/extensions
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema), and the 'role' field must be set to external. To get a version that isn't released, the user in user_id must own the extension or be on the version's testing allowlist.
Query Parameters
extension_idStringRequiredThe ID of the extension to get.extension_versionStringThe version of the extension to get. If not specified, it returns the released version. If the extension doesn't have a released version, you must specify a version; otherwise, the request fails with 404 Not Found.
Response Body
dataObject[]A list that contains the specified extension.Hide child attributesShow child attributes
data.author_nameStringThe name of the user or organization that owns the extension.data.bits_enabledBooleanA Boolean value that determines whether the extension has features that use Bits. Is true if the extension has features that use Bits.data.can_installBooleanA Boolean value that determines whether a user can install the extension on their channel. Is true if a user can install the extension.
Typically, this is set to false if the extension is currently in testing mode and requires users to be allowlisted (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Access).
data.configuration_locationStringThe location of where the extension's configuration is stored.Possible values
hostedThe Extensions Configuration Service hosts the configuration.customThe Extension Backend Service (EBS) hosts the configuration.noneThe extension doesn't require configuration.
data.descriptionStringA longer description of the extension. It appears on the details page.data.eula_tos_urlStringA URL to the extension's Terms of Service.data.has_chat_supportBooleanA Boolean value that determines whether the extension can communicate with the installed channel's chat. Is true if the extension can communicate with the channel's chat room.data.icon_urlStringA URL to the default icon that's displayed in the Extensions directory.data.icon_urlsmap[string]stringA dictionary that contains URLs to different sizes of the default icon. The dictionary's key identifies the icon's size (for example, 24x24), and the dictionary's value contains the URL to the icon.data.idStringThe extension's ID.data.nameStringThe extension's name.data.privacy_policy_urlStringA URL to the extension's privacy policy.data.request_identity_linkBooleanA Boolean value that determines whether the extension wants to explicitly ask viewers to link their Twitch identity.data.screenshot_urlsString[]A list of URLs to screenshots that are shown in the Extensions marketplace.data.stateStringThe extension's state.Possible values
ApprovedAssets UploadedDeletedDeprecatedIn ReviewPending ActionRejectedReleasedTesting
data.subscriptions_support_levelStringIndicates whether the extension can view the user's subscription level on the channel that the extension is installed on.Possible values
noneThe extension can't view the user's subscription level.optionalThe extension can view the user's subscription level.
data.summaryStringA short description of the extension that streamers see when hovering over the discovery splash screen in the Extensions manager.data.support_emailStringThe email address that users use to get support for the extension.data.versionStringThe extension's version number.data.viewer_summaryStringA brief description displayed on the channel to explain how the extension works.data.viewsObjectDescribes all views-related information such as how the extension is displayed on mobile devices. The object includes only the views that the extension supports.Hide child attributesShow child attributes
data.views.mobileObjectDescribes how the extension is displayed on mobile devices.Hide child attributesShow child attributes
data.views.mobile.viewer_urlStringThe HTML file that is shown to viewers on mobile devices. This page is presented to viewers as a panel behind the chat area of the mobile app.
data.views.panelObjectDescribes how the extension is rendered if the extension may be activated as a panel extension.Hide child attributesShow child attributes
data.views.panel.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated in a Panel slot.data.views.panel.heightIntegerThe height, in pixels, of the panel component that the extension is rendered in.data.views.panel.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.video_overlayObjectDescribes how the extension is rendered if the extension may be activated as a video-overlay extension.Hide child attributesShow child attributes
data.views.video_overlay.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated on the Video - Overlay slot.data.views.video_overlay.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.componentObjectDescribes how the extension is rendered if the extension may be activated as a video-component extension.Hide child attributesShow child attributes
data.views.component.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated in a Video - Component slot.data.views.component.aspect_widthIntegerDeprecated.data.views.component.aspect_heightIntegerDeprecated.data.views.component.aspect_ratio_xIntegerThe width value of the ratio (width : height) which determines the extension's width, and how the extension's iframe will resize in different video player environments.data.views.component.aspect_ratio_yIntegerThe height value of the ratio (width : height) which determines the extension's height, and how the extension's iframe will resize in different video player environments.data.views.component.autoscaleBooleanA Boolean value that determines whether to apply CSS zoom. If true, a CSS zoom is applied such that the size of the extension is variable but the inner dimensions are fixed based on Scale Pixels. This allows your extension to render as if it is of fixed width and height. If false, the inner dimensions of the extension iframe are variable, meaning your extension must implement responsiveness.data.views.component.scale_pixelsIntegerThe base width, in pixels, of the extension to use when scaling (see 'autoscale'). This value is ignored if 'autoscale' is false.data.views.component.target_heightIntegerThe height as a percent of the maximum height of a video component extension. Values are between 1% - 100%.data.views.component.sizeFloatDeprecated.data.views.component.zoomBooleanDeprecated.data.views.component.zoom_pixelsIntegerDeprecated.data.views.component.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.configObjectDescribes the view that is shown to broadcasters while they are configuring your extension within the Extension Manager.Hide child attributesShow child attributes
data.views.config.viewer_urlStringThe HTML file shown to broadcasters while they are configuring your extension within the Extension Manager.data.views.config.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.live_configObjectDescribes the view that is shown to broadcasters in the Live module of the dashboard.Hide child attributesShow child attributes
data.views.live_config.viewer_urlStringThe HTML file that is shown to broadcasters in the Live module of the dashboard. It's used for actions that broadcasters take while the extension is active, such as creating a new poll.data.views.live_config.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.allowlisted_config_urlsString[]Allowlisted configuration URLs for displaying the extension (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Capabilities).data.allowlisted_panel_urlsString[]Allowlisted panel URLs for displaying the extension (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Capabilities).
Response Codes
- 200OK
- Successfully retrieved the list of extensions.
- 400Bad Request
- The extension_id query parameter is required.
- 401Unauthorized
- The request must specify the Authorization header.
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The version in extension_version isn't released, and the user in the JWT's user_id field isn't allowed to get it.
- The request must specify the Client-Id header.
- 404Not Found
- The extension in the extension_id query parameter was not found.
- The extension_version query parameter isn't specified, and the extension doesn't have a released version.
curl -X GET 'https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/extensions",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.9",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/extensions?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&extension_version=0.0.9")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"author_name": "Twitch Developers",
"bits_enabled": true,
"can_install": false,
"configuration_location": "hosted",
"description": "An extension for testing all the features that we add to extensions",
"eula_tos_url": "",
"has_chat_support": true,
"icon_url": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/logob6c995d8-8b45-48cc-a748-b256e92ac1cd",
"icon_urls": {
"100x100": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/logob6c995d8-8b45-48cc-a748-b256e92ac1cd",
"24x24": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/taskbar905b19da-e7e5-4d8f-beb7-f543a861ac1e",
"300x200": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/discoveryd9545b2c-5474-46d7-a523-1c3835d862ce"
},
"id": "pgn0bjv51epi7eaekt53tovjnc82qo",
"name": "Official Developers Demo",
"privacy_policy_url": "",
"request_identity_link": true,
"screenshot_urls": [
"https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/screenshotbdec475d-3d2f-4378-b334-941dfddc897a"
],
"state": "Released",
"subscriptions_support_level": "optional",
"summary": "Test ALL the extensions features!",
"support_email": "dx-extensions-test-dev@justin.tv",
"version": "0.0.9",
"viewer_summary": "Test ALL the extensions features!",
"views": {
"mobile": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html"
},
"panel": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"height": 300,
"can_link_external_content": false
},
"video_overlay": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"can_link_external_content": false
},
"component": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"aspect_width": 0,
"aspect_height": 0,
"aspect_ratio_x": 48000,
"aspect_ratio_y": 36000,
"autoscale": true,
"scale_pixels": 1024,
"target_height": 5333,
"size": 0,
"zoom": false,
"zoom_pixels": 0,
"can_link_external_content": false
}
},
"allowlisted_config_urls": [],
"allowlisted_panel_urls": []
}
]
}Send Extension Chat Message
Sends a message to the specified broadcaster's chat room.
The extension's name is used as the username for the message in the chat room. To send a chat message, your extension must enable Chat Capabilities (under your extension's Capabilities tab).
Rate Limits: You may send a maximum of 12 messages per minute per combination of broadcaster ID, extension ID, and extension version.
Endpoint
POSThttps://api.twitch.tv/helix/extensions/chat
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). The 'role' field must be set to external or broadcaster, and the user_id field must contain the ID of the user that owns the extension or the ID in broadcaster_id.
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster that has activated the extension.
Request Body
textStringRequiredThe message. The message may contain a maximum of 280 characters.extension_idStringRequiredThe ID of the extension that's sending the chat message.extension_versionStringRequiredThe extension's version number.
Response Codes
- 204No Content
- Successfully sent the chat message.
- 400Bad Request
- The broadcaster_id query parameter is required.
- The 'extension_id' field in the request's body is required.
- The 'extension_version' field in the request's body is required.
- The 'text' field in the request's body is required.
- The 'text' field in the request's body must contain non-whitespace characters.
- The message is too long.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The user_id field in the JWT must contain the ID of the user that owns the extension or the ID in broadcaster_id.
- The extension must be active on the broadcaster's channel with chat enabled.
- The JWT token is not valid.
- The Client-Id header is required.
- 404Not Found
- The extension version in the 'extension_version' field isn't installed on the broadcaster's channel.
curl -X POST 'https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{"text":"Hello","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.9"}'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$body = '{"text":"Hello","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.9"}'
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755" `
-Method Post -Headers $headers `
-ContentType "application/json" -Body $bodyconst response = await fetch("https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"text": "Hello",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.9"
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/extensions/chat",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"broadcaster_id": "237757755",
},
json={
"text": "Hello",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.9",
},
)
data = response.json()body := strings.NewReader(`{"text":"Hello","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.9"}`)
req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755", body)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"text":"Hello","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.9"}');
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
request.Content = new StringContent("{\"text\":\"Hello\",\"extension_id\":\"uo6dggojyb8d6soh92zknwmi5ej1q2\",\"extension_version\":\"0.0.9\"}",
Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.post("https://api.twitch.tv/helix/extensions/chat?broadcaster_id=237757755")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.json(&serde_json::json!({
"text": "Hello",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.9"
}))
.send()
.await?;
let data = response.text().await?;Get Extension Configuration Segment
Rate Limits: You may make a maximum of 20 requests per minute per combination of extension client ID and broadcaster ID, regardless of which segments you request. Requests that don't specify a broadcaster ID share a single limit per extension client ID.
Endpoint
GEThttps://api.twitch.tv/helix/extensions/configurations
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). The 'role' field must be set to external.
Query Parameters
broadcaster_idStringThe ID of the broadcaster that installed the extension. This parameter is required if you set the segment parameter to broadcaster or developer. Do not specify this parameter if you set segment to global.extension_idStringRequiredThe ID of the extension that contains the configuration segment you want to get.segmentString[]The type of configuration segment to get. To get more than one segment, include this parameter for each segment, for example,segment=broadcaster&segment=developer. If you don't specify a segment, the list in the response is empty.Possible values
broadcasterdeveloperglobal
Response Body
dataObject[]The list of requested configuration segments. The list is returned in the same order that you specified the list of segments in the request. Segments that haven't been set aren't included in the list.Hide child attributesShow child attributes
data.segmentStringThe type of segment.Possible values
broadcasterdeveloperglobal
data.broadcaster_idStringThe ID of the broadcaster that installed the extension. Is an empty string if 'segment' is global.data.contentStringThe contents of the segment. This string may be a plain-text string or a string-encoded JSON object.data.versionStringThe version number that identifies this definition of the segment's data.
Response Codes
- 200OK
- Successfully retrieved the configurations.
- 400Bad Request
- The extension_id query parameter is required.
- The value in the segment query parameter is not valid.
- The broadcaster_id query parameter is required if the segment query parameter is set to broadcaster or developer.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The Client-Id header is required.
- 429Too many requests
- The app exceeded the number of requests that it may make per minute. See Rate Limits above.
curl -X GET 'https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/extensions/configurations",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_id": "<your extension id>",
"segment": "global",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/extensions/configurations?extension_id=%3Cyour%20extension%20id%3E&segment=global")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"segment": "global",
"broadcaster_id": "",
"content": "hello config!",
"version": "0.0.1"
}
]
}Set Extension Configuration Segment
Updates an Extension configuration segment.
The segment is limited to 5 KB. Extensions that are active on a channel do not receive the updated configuration.
Rate Limits: You may update the configuration a maximum of 20 times per minute.
Endpoint
PUThttps://api.twitch.tv/helix/extensions/configurations
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). Set the 'role' field to external and the user_id field to the ID of the user that owns the extension. To update the broadcaster segment, you may instead set user_id to the ID in broadcaster_id.
Request Body
extension_idStringRequiredThe ID of the extension to update.segmentStringRequiredThe configuration segment to update.Possible values
broadcasterdeveloperglobal
broadcaster_idStringThe ID of the broadcaster that installed the extension. Include this field only if the 'segment' is set to developer or broadcaster.contentStringThe contents of the segment. This string may be a plain-text string or a string-encoded JSON object.versionStringThe version number that identifies this definition of the segment's data. If not specified, the segment is saved with an empty version string.
Response Codes
- 204No Content
- Successfully updated the configuration.
- 400Bad Request
- The extension_id field is required.
- The 'segment' field is required and must be set to broadcaster, developer, or global.
- The broadcaster_id field is required if 'segment' is set to developer or broadcaster.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The user_id field in the JWT must contain the ID of the user that owns the extension, or, for the broadcaster segment, the ID in broadcaster_id.
- The Client-Id header is required.
- 422Unprocessable Entity
- The segment's content is larger than 5 KB.
- The broadcaster_id field may not be set if 'segment' is set to global.
curl -X PUT 'https://api.twitch.tv/helix/extensions/configurations' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{"extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","segment":"global","version":"0.0.1","content":"hello config!"}'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$body = '{"extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","segment":"global","version":"0.0.1","content":"hello config!"}'
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/configurations" `
-Method Put -Headers $headers `
-ContentType "application/json" -Body $bodyconst response = await fetch("https://api.twitch.tv/helix/extensions/configurations", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"segment": "global",
"version": "0.0.1",
"content": "hello config!"
}),
});
const data = await response.json();import requests
response = requests.put(
"https://api.twitch.tv/helix/extensions/configurations",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
json={
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"segment": "global",
"version": "0.0.1",
"content": "hello config!",
},
)
data = response.json()body := strings.NewReader(`{"extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","segment":"global","version":"0.0.1","content":"hello config!"}`)
req, _ := http.NewRequest("PUT", "https://api.twitch.tv/helix/extensions/configurations", body)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/configurations");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","segment":"global","version":"0.0.1","content":"hello config!"}');
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://api.twitch.tv/helix/extensions/configurations");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
request.Content = new StringContent("{\"extension_id\":\"uo6dggojyb8d6soh92zknwmi5ej1q2\",\"segment\":\"global\",\"version\":\"0.0.1\",\"content\":\"hello config!\"}",
Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.put("https://api.twitch.tv/helix/extensions/configurations")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.json(&serde_json::json!({
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"segment": "global",
"version": "0.0.1",
"content": "hello config!"
}))
.send()
.await?;
let data = response.text().await?;Get Extension Secrets
Gets an extension's list of shared secrets.
Endpoint
GEThttps://api.twitch.tv/helix/extensions/jwt/secrets
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). Set the 'role' field to external and the user_id field to the ID of the user that owns the extension.
Query Parameters
extension_idStringRequiredThe ID of the extension whose shared secrets you want to get.
Response Body
dataObject[]The list of shared secrets that the extension created.Hide child attributesShow child attributes
data.format_versionIntegerThe version number that identifies this definition of the secret's data.data.secretsObject[]The list of secrets.Hide child attributesShow child attributes
data.secrets.contentStringThe secret, base64-encoded. Decode it to get the key that you use to sign and verify JWTs.data.secrets.active_atStringThe UTC date and time (in RFC3339 format) that you may begin using this secret to sign a JWT.data.secrets.expires_atStringThe UTC date and time (in RFC3339 format) that you must stop using this secret to decode a JWT.
Response Codes
- 200OK
- Successfully retrieved the list of secrets.
- 400Bad Request
- The extension_id query parameter is required.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The user_id field in the JWT must contain the ID of the user that owns the extension.
- The Client-Id header is required.
curl -X GET 'https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/extensions/jwt/secrets",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"format_version": 1,
"secrets": [
{
"content": "K7gNU3sdo+OL0wNhqoVWhr3g6s1xYv72ol/pe/Unols=",
"active_at": "2021-03-29T06:58:40.858343036Z",
"expires_at": "2121-03-05T06:58:40.858343036Z"
}
]
}
]
}Create Extension Secret
Creates a shared secret used to sign and verify JWT tokens.
Creating a new secret removes the current secrets from service. Use this function only when you are ready to use the new secret it returns.
Endpoint
POSThttps://api.twitch.tv/helix/extensions/jwt/secrets
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). Set the 'role' field to external and the user_id field to the ID of the user that owns the extension.
Query Parameters
extension_idStringRequiredThe ID of the extension to apply the shared secret to.delayIntegerThe amount of time, in seconds, to delay activating the secret. The delay should provide enough time for instances of the extension to gracefully switch over to the new secret. The minimum delay is 300 seconds (5 minutes). The default is 300 seconds.
Response Body
dataObject[]A list that contains the newly added secrets.Hide child attributesShow child attributes
data.format_versionIntegerThe version number that identifies this definition of the secret's data.data.secretsObject[]The list of secrets.Hide child attributesShow child attributes
data.secrets.contentStringThe secret, base64-encoded. Decode it to get the key that you use to sign and verify JWTs.data.secrets.active_atStringThe UTC date and time (in RFC3339 format) that you may begin using this secret to sign a JWT.data.secrets.expires_atStringThe UTC date and time (in RFC3339 format) that you must stop using this secret to decode a JWT.
Response Codes
- 200OK
- Successfully created the new secret.
- 400Bad Request
- The extension_id query parameter is required.
- The delay specified in the delay query parameter is too short.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The user_id field in the JWT must contain the ID of the user that owns the extension.
- The Client-Id header is required.
curl -X POST 'https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600" `
-Method Post -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/extensions/jwt/secrets",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"delay": "600",
},
)
data = response.json()req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.post("https://api.twitch.tv/helix/extensions/jwt/secrets?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2&delay=600")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"format_version": 1,
"secrets": [
{
"content": "XYZd6uBvvTT+nOhI8+X8Q2jy9hKxiu9H8p8hZFY6AUA=",
"active_at": "2021-03-29T06:58:40.858343036Z",
"expires_at": "2021-04-22T05:21:54.99261682Z"
},
{
"content": "/Je7UoYfzzKNCnq+IB+WMrhwPkNmVjSPbRs5j0LpLDk=",
"active_at": "2021-04-22T04:16:54.996365329Z",
"expires_at": "2121-03-29T04:16:54.996365329Z"
}
]
}
]
}Get Extension Live Channels
Gets a list of broadcasters that are streaming live and have installed or activated the extension.
It may take a few minutes for the list to include or remove broadcasters that have recently gone live or stopped broadcasting.
If the extension requires configuration through the configuration service, the list includes only broadcasters whose broadcaster and developer configuration segments have the required versions.
Endpoint
GEThttps://api.twitch.tv/helix/extensions/live
Authorization
Requires one of the following:
Query Parameters
extension_idStringRequiredThe ID of the extension to get. Returns the list of broadcasters that are live and that have installed or activated this extension.firstIntegerThe specific maximum number of items per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20. The actual number returned may be less than this limit. Read MoreafterStringThe cursor used to get the next page of results. The 'pagination' field in the response contains the cursor's value. Read More
Response Body
dataObject[]The list of broadcasters that are streaming live and that have installed or activated the extension.Hide child attributesShow child attributes
data.broadcaster_idStringThe ID of the broadcaster that is streaming live and has installed or activated the extension.data.broadcaster_nameStringThe broadcaster's display name.data.game_nameStringThe name of the category or game being streamed.data.game_idStringThe ID of the category or game being streamed. May be an empty string if the category can't be identified.data.titleStringThe title of the broadcaster's stream. May be an empty string if not specified.
paginationStringThis field contains the cursor used to page through the results. The field is empty if there are no more pages left to page through. Note that this field is a string compared to other endpoints that use a Pagination object. Read More
Response Codes
- 200OK
- Successfully retrieved the list of broadcasters. The list is empty if no broadcasters that use the extension are streaming live.
- 400Bad Request
- The extension_id query parameter is required.
- The first query parameter is outside the allowed range of values.
- The pagination cursor is not valid.
- 401Unauthorized
- The Authorization header is required and must specify an app access token or user access token.
- The access token is not valid.
- The ID in the Client-Id header must match the client ID in the access token.
- 404Not Found
- The extension specified in the extension_id query parameter was not found or hasn't been released.
curl -X GET 'https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/extensions/live",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/extensions/live?extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"broadcaster_id": "252766116",
"broadcaster_name": "swoosh_xii",
"game_name": "Tom Clancy's Rainbow Six Siege",
"game_id": "460630",
"title": "[PS4] ITA/ENG UNRANKED CHILLIN' (SUB 1/15) - !instagram !donation !sens !team !youtube"
},
{
"broadcaster_id": "264525686",
"broadcaster_name": "gaddem_",
"game_name": "For Honor",
"game_id": "490382",
"title": "any Kätzchen ? - 680 Rep + > Kompetitive Kitten"
},
{
"broadcaster_id": "264787895",
"broadcaster_name": "LenhadorGameplay",
"game_name": "For Honor",
"game_id": "490382",
"title": "Vazou o novo personagem! *Triste*"
}
],
"pagination": "YVc1emRHRnNiQ015TmpJek5qazVOVHBoYWpKbGRIZDFaR0Z5YjNCMGN6UTJNMkZ1TUdwM2FHWnBZbm8yYW5rNjoy"
}Send Extension PubSub Message
Sends a message to one or more viewers.
You can send messages to a specific channel or to all channels where your extension is active. This endpoint uses the same mechanism as the send JavaScript helper function used to send messages.
Rate Limits: You may send a maximum of 100 messages per minute per combination of extension client ID and broadcaster ID.
Endpoint
POSThttps://api.twitch.tv/helix/extensions/pubsub
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).
Requires a signed JSON Web Token (JWT) created by an Extension Backend Service (EBS). For signing requirements, see Signing the JWT. The signed JWT must include the 'role', 'exp', 'channel_id', and 'pubsub_perms' fields (see JWT Schema). Your EBS should set the 'role' field to external.
To send the message to a specific channel, set the 'channel_id' field in the JWT to the channel's ID and set the 'pubsub_perms.send' array to broadcast.
{ "exp": 1503343947, "user_id": "27419011", "role": "external", "channel_id": "27419011", "pubsub_perms": { "send":[ "broadcast" ] } }To send the message to all channels on which your extension is active, set the 'channel_id' field to all and set the 'pubsub_perms.send' array to global.
{ "exp": 1503343947, "user_id": "27419011", "role": "external", "channel_id": "all", "pubsub_perms": { "send":[ "global" ] } }
Request Body
targetString[]RequiredThe target of the message.Possible values
broadcastglobalwhisper-<user-id>
broadcaster_idStringThe ID of the broadcaster to send the message to. This field is required if 'is_global_broadcast' is false. Don't include this field if 'is_global_broadcast' is set to true.is_global_broadcastBooleanA Boolean value that determines whether the message should be sent to all channels where your extension is active. Set to true if the message should be sent to all channels. The default is false.messageStringRequiredThe message to send. The message can be a plain-text string or a string-encoded JSON object. The message is limited to a maximum of 5 KB.
Response Codes
- 204No Content
- Successfully sent the message.
- 400Bad Request
- The broadcaster_id field in the request's body may only be set if the 'is_global_broadcast' field is set to false.
- The broadcaster_id field in the request's body is required if the 'is_global_broadcast' field is set to false.
- The 'message' field in the request's body is required.
- The 'target' field in the request's body is required.
- The JWT must include the 'pubsub_perms' field.
- The 'role' field in the JWT is not valid.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The Client-Id header is required.
- 403Forbidden
- The 'channel_id' field in the JWT must match the ID in broadcaster_id, or must be set to all if 'is_global_broadcast' is true.
- JWT could not be verified
- The JWT has expired.
- The 'pubsub_perms.send' field in the JWT must allow every target in the 'target' field.
- 404Not Found
- The extension in the Client-Id header was not found.
- 422Unprocessable Entity
- The message is too large.
curl -X POST 'https://api.twitch.tv/helix/extensions/pubsub' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{"message":"hello world!","broadcaster_id":"141981764","target":["broadcast"]}'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$body = '{"message":"hello world!","broadcaster_id":"141981764","target":["broadcast"]}'
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/pubsub" `
-Method Post -Headers $headers `
-ContentType "application/json" -Body $bodyconst response = await fetch("https://api.twitch.tv/helix/extensions/pubsub", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"message": "hello world!",
"broadcaster_id": "141981764",
"target": [
"broadcast"
]
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/extensions/pubsub",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
json={
"message": "hello world!",
"broadcaster_id": "141981764",
"target": ["broadcast"],
},
)
data = response.json()body := strings.NewReader(`{"message":"hello world!","broadcaster_id":"141981764","target":["broadcast"]}`)
req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/extensions/pubsub", body)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/pubsub");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"message":"hello world!","broadcaster_id":"141981764","target":["broadcast"]}');
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.twitch.tv/helix/extensions/pubsub");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
request.Content = new StringContent("{\"message\":\"hello world!\",\"broadcaster_id\":\"141981764\",\"target\":[\"broadcast\"]}",
Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.post("https://api.twitch.tv/helix/extensions/pubsub")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.json(&serde_json::json!({
"message": "hello world!",
"broadcaster_id": "141981764",
"target": [
"broadcast"
]
}))
.send()
.await?;
let data = response.text().await?;Get Released Extensions
Returns the extension if its 'state' is Released.
Endpoint
GEThttps://api.twitch.tv/helix/extensions/released
Authorization
Requires one of the following:
Query Parameters
extension_idStringRequiredThe ID of the extension to get.extension_versionStringThe version of the extension to get. If not specified, it returns the released version.
Response Body
dataObject[]A list that contains the specified extension.Hide child attributesShow child attributes
data.author_nameStringThe name of the user or organization that owns the extension.data.bits_enabledBooleanA Boolean value that determines whether the extension has features that use Bits. Is true if the extension has features that use Bits.data.can_installBooleanA Boolean value that determines whether a user can install the extension on their channel. Is true if a user can install the extension.
Typically, this is set to false if the extension is currently in testing mode and requires users to be allowlisted (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Access).
data.configuration_locationStringThe location of where the extension's configuration is stored.Possible values
hostedThe Extensions Configuration Service hosts the configuration.customThe Extension Backend Service (EBS) hosts the configuration.noneThe extension doesn't require configuration.
data.descriptionStringA longer description of the extension. It appears on the details page.data.eula_tos_urlStringA URL to the extension's Terms of Service.data.has_chat_supportBooleanA Boolean value that determines whether the extension can communicate with the installed channel's chat. Is true if the extension can communicate with the channel's chat room.data.icon_urlStringA URL to the default icon that's displayed in the Extensions directory.data.icon_urlsmap[string]stringA dictionary that contains URLs to different sizes of the default icon. The dictionary's key identifies the icon's size (for example, 24x24), and the dictionary's value contains the URL to the icon.data.idStringThe extension's ID.data.nameStringThe extension's name.data.privacy_policy_urlStringA URL to the extension's privacy policy.data.request_identity_linkBooleanA Boolean value that determines whether the extension wants to explicitly ask viewers to link their Twitch identity.data.screenshot_urlsString[]A list of URLs to screenshots that are shown in the Extensions marketplace.data.stateStringThe extension's state. This endpoint returns only released extensions.Possible values
Released
data.subscriptions_support_levelStringIndicates whether the extension can view the user's subscription level on the channel that the extension is installed on.Possible values
noneThe extension can't view the user's subscription level.optionalThe extension can view the user's subscription level.
data.summaryStringA short description of the extension that streamers see when hovering over the discovery splash screen in the Extensions manager.data.support_emailStringThe email address that users use to get support for the extension.data.versionStringThe extension's version number.data.viewer_summaryStringA brief description displayed on the channel to explain how the extension works.data.viewsObjectDescribes all views-related information such as how the extension is displayed on mobile devices. The object includes only the views that the extension supports.Hide child attributesShow child attributes
data.views.mobileObjectDescribes how the extension is displayed on mobile devices.Hide child attributesShow child attributes
data.views.mobile.viewer_urlStringThe HTML file that is shown to viewers on mobile devices. This page is presented to viewers as a panel behind the chat area of the mobile app.
data.views.panelObjectDescribes how the extension is rendered if the extension may be activated as a panel extension.Hide child attributesShow child attributes
data.views.panel.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated in a Panel slot.data.views.panel.heightIntegerThe height, in pixels, of the panel component that the extension is rendered in.data.views.panel.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.video_overlayObjectDescribes how the extension is rendered if the extension may be activated as a video-overlay extension.Hide child attributesShow child attributes
data.views.video_overlay.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated on the Video - Overlay slot.data.views.video_overlay.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.componentObjectDescribes how the extension is rendered if the extension may be activated as a video-component extension.Hide child attributesShow child attributes
data.views.component.viewer_urlStringThe HTML file that is shown to viewers on the channel page when the extension is activated in a Video - Component slot.data.views.component.aspect_widthIntegerDeprecated.data.views.component.aspect_heightIntegerDeprecated.data.views.component.aspect_ratio_xIntegerThe width value of the ratio (width : height) which determines the extension's width, and how the extension's iframe will resize in different video player environments.data.views.component.aspect_ratio_yIntegerThe height value of the ratio (width : height) which determines the extension's height, and how the extension's iframe will resize in different video player environments.data.views.component.autoscaleBooleanA Boolean value that determines whether to apply CSS zoom. If true, a CSS zoom is applied such that the size of the extension is variable but the inner dimensions are fixed based on Scale Pixels. This allows your extension to render as if it is of fixed width and height. If false, the inner dimensions of the extension iframe are variable, meaning your extension must implement responsiveness.data.views.component.scale_pixelsIntegerThe base width, in pixels, of the extension to use when scaling (see 'autoscale'). This value is ignored if 'autoscale' is false.data.views.component.target_heightIntegerThe height as a percent of the maximum height of a video component extension. Values are between 1% - 100%.data.views.component.sizeFloatDeprecated.data.views.component.zoomBooleanDeprecated.data.views.component.zoom_pixelsIntegerDeprecated.data.views.component.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.configObjectDescribes the view that is shown to broadcasters while they are configuring your extension within the Extension Manager.Hide child attributesShow child attributes
data.views.config.viewer_urlStringThe HTML file shown to broadcasters while they are configuring your extension within the Extension Manager.data.views.config.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.views.live_configObjectDescribes the view that is shown to broadcasters in the Live module of the dashboard.Hide child attributesShow child attributes
data.views.live_config.viewer_urlStringThe HTML file that is shown to broadcasters in the Live module of the dashboard. It's used for actions that broadcasters take while the extension is active, such as creating a new poll.data.views.live_config.can_link_external_contentBooleanA Boolean value that determines whether the extension can link to non-Twitch domains.
data.allowlisted_config_urlsString[]Allowlisted configuration URLs for displaying the extension (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Capabilities).data.allowlisted_panel_urlsString[]Allowlisted panel URLs for displaying the extension (the allowlist is configured on Twitch's developer site under the Extensions -> Extension -> Version -> Capabilities).
Response Codes
- 200OK
- Successfully retrieved the extension.
- 400Bad Request
- The extension_id query parameter is required.
- 401Unauthorized
- The Authorization header must specify an app access token or user access token.
- The access token is not valid.
- The ID in the Client-Id header must match the client ID in the access token.
- The version specified in the extension_version query parameter isn't released.
- 404Not Found
- The extension specified in the extension_id query parameter was not found or doesn't have a released version.
- The version specified in the extension_version query parameter was not found or was deleted.
curl -X GET 'https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/extensions/released",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"extension_version": "0.0.9",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/extensions/released?extension_version=0.0.9&extension_id=uo6dggojyb8d6soh92zknwmi5ej1q2")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"author_name": "Twitch Developer Experience",
"bits_enabled": true,
"can_install": false,
"configuration_location": "hosted",
"description": "An extension for testing all the features that we add to extensions",
"eula_tos_url": "",
"has_chat_support": true,
"icon_url": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/logob6c995d8-8b45-48cc-a748-b256e92ac1cd",
"icon_urls": {
"100x100": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/logob6c995d8-8b45-48cc-a748-b256e92ac1cd",
"24x24": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/taskbar905b19da-e7e5-4d8f-beb7-f543a861ac1e",
"300x200": "https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/discoveryd9545b2c-5474-46d7-a523-1c3835d862ce"
},
"id": "pgn0bjv51epi7eaekt53tovjnc82qo",
"name": "Official Developer Experience Demo",
"privacy_policy_url": "",
"request_identity_link": true,
"screenshot_urls": [
"https://extensions-discovery-images.twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.8/screenshotbdec475d-3d2f-4378-b334-941dfddc897a"
],
"state": "Released",
"subscriptions_support_level": "optional",
"summary": "Test ALL the extensions features!",
"support_email": "dx-extensions-test-dev@justin.tv",
"version": "0.0.9",
"viewer_summary": "Test ALL the extensions features!",
"views": {
"mobile": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html"
},
"panel": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"height": 300,
"can_link_external_content": false
},
"video_overlay": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"can_link_external_content": false
},
"component": {
"viewer_url": "https://pgn0bjv51epi7eaekt53tovjnc82qo.ext-twitch.tv/pgn0bjv51epi7eaekt53tovjnc82qo/0.0.9/f9a0d8aae0f9dd0b2d6ef3416b96bc79/index.html",
"aspect_width": 0,
"aspect_height": 0,
"aspect_ratio_x": 48000,
"aspect_ratio_y": 36000,
"autoscale": true,
"scale_pixels": 1024,
"target_height": 5333,
"size": 0,
"zoom": false,
"zoom_pixels": 0,
"can_link_external_content": false
}
},
"allowlisted_config_urls": [],
"allowlisted_panel_urls": []
}
]
}Set Extension Required Configuration
Updates the extension's required_configuration string.
Use this endpoint if your extension requires the broadcaster to configure the extension before activating it (to require configuration, you must select Custom/My Own Service in Extension Capabilities). For more information, see Required Configurations and Setting Required Configuration.
Endpoint
PUThttps://api.twitch.tv/helix/extensions/required_configuration
Authorization
Requires one of the following:
- A signed JSON Web Token (JWT).Requires a signed JSON Web Token (JWT) created by an EBS. For signing requirements, see Signing the JWT. The signed JWT must include the 'role', user_id, and 'exp' fields (see JWT Schema). Set the 'role' field to external and the user_id field to the ID of the user that owns the extension.
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster that installed the extension on their channel.
Request Body
extension_idStringRequiredThe ID of the extension to update.extension_versionStringRequiredThe version of the extension to update.required_configurationStringRequiredThe required_configuration string to use with the extension.
Response Codes
- 204No Content
- Successfully updated the extension's required_configuration string.
- 400Bad Request
- The broadcaster_id query parameter is required.
- The 'extension_id' field is required.
- The 'extension_version' field is required.
- The 'required_configuration' field is required.
- 401Unauthorized
- The Authorization header is required and must specify a JWT token.
- The JWT token is not valid.
- The Client-Id header is required.
- The user in the JWT's user_id field isn't allowed to manage the extension specified in the 'extension_id' field.
- 404Not Found
- The extension version specified in the 'extension_version' field was not found.
curl -X PUT 'https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{"required_configuration":"RCS","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.1"}'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$body = '{"required_configuration":"RCS","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.1"}'
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212" `
-Method Put -Headers $headers `
-ContentType "application/json" -Body $bodyconst response = await fetch("https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
"Content-Type": "application/json",
},
body: JSON.stringify({
"required_configuration": "RCS",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.1"
}),
});
const data = await response.json();import requests
response = requests.put(
"https://api.twitch.tv/helix/extensions/required_configuration",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"broadcaster_id": "274637212",
},
json={
"required_configuration": "RCS",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.1",
},
)
data = response.json()body := strings.NewReader(`{"required_configuration":"RCS","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.1"}`)
req, _ := http.NewRequest("PUT", "https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212", body)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"required_configuration":"RCS","extension_id":"uo6dggojyb8d6soh92zknwmi5ej1q2","extension_version":"0.0.1"}');
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
request.Content = new StringContent("{\"required_configuration\":\"RCS\",\"extension_id\":\"uo6dggojyb8d6soh92zknwmi5ej1q2\",\"extension_version\":\"0.0.1\"}",
Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.put("https://api.twitch.tv/helix/extensions/required_configuration?broadcaster_id=274637212")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.json(&serde_json::json!({
"required_configuration": "RCS",
"extension_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
"extension_version": "0.0.1"
}))
.send()
.await?;
let data = response.text().await?;