Embedding Chat
Usage
To embed a Twitch chat window in your website, use this expression:
<iframe src="https://www.twitch.tv/embed/<channel>/chat?parent=<parent>"
height="<height>"
width="<width>">
</iframe>
Parameters
Name | Type | Description |
---|---|---|
height |
number or string | Height of the chat window, in pixels. Can also be expressed as a percentage, by passing a string like 50% |
parent |
string | (Required) Domain(s) that will be embedding Twitch. You must have one parent key for each domain your site is hosted or embedded on. |
sandbox |
string | Note: the sandbox attribute is not required, but if you specify it, you must include the following keywords to ensure all Twitch features function as expected: allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-modals |
src |
string | Chat window URL. |
width |
number or string | Width of the chat window, in pixels. Can be expressed as a percentage, by passing a string like 50% |
Example
<iframe id="chat_embed"
src="https://www.twitch.tv/embed/hebo/chat?parent=streamernews.example.com"
height="500"
width="350">
</iframe>