# Configure StreamLink

Now you'll configure StreamLink with your API Key and Channel ID.

#### Method 1: Dashboard UI (Recommended)

This is the easiest method with visual feedback and credential masking.

**Open the Dashboard**

1. Join your Hytale server
2. Run the command:

<pre><code><a data-footnote-ref href="#user-content-fn-1">/sl</a> ui
</code></pre>

3. The StreamLink dashboard will open

**Navigate to YouTube Tab**

1. Click the **"YouTube"** tab at the top of the dashboard
2. The YouTube integration form will appear

**Fill in Credentials**

1. **API Key Field:**
   * Click the "API Key" input field
   * Paste your API key from Step 3
   * The field will automatically mask the key with asterisks (`****`)
2. **Channel ID Field:**
   * Click the "Channel ID" input field
   * Paste your Channel ID from Step 4
   * The field will automatically mask the ID with asterisks (`****`)

{% hint style="info" %}
**Credential Masking:** When you click away from the input fields, your credentials are automatically masked for security. Click the field again to reveal and edit them.
{% endhint %}

**Connect to YouTube**

1. **Start Your Live Stream** on YouTube first!
   * Go to [YouTube Studio](https://studio.youtube.com/)
   * Click "Create" → "Go live"
   * Set up and start your stream
   * **Ensure "Enable chat" is checked**
2. Wait 30-60 seconds for your stream to start fully
3. Back in the StreamLink dashboard, click **"Connect"**
4. Watch for status messages in chat and the status indicator in the dashboard

**Verify Connection**

**Dashboard Status Indicator:**

* 🔴 Red dot = Disconnected
* 🟡 Yellow dot = Connecting...
* 🟢 Green dot = Connected

**Chat Messages:**

```
[StreamLink] Validating credentials...
[StreamLink] API Key validated!
[StreamLink] Connecting to YouTube live chat...
[StreamLink] Connected to YouTube live chat
```

✅ **Success!** You should now see YouTube chat messages appearing in-game!

***

#### Method 2: Commands

If you prefer command-line configuration:

**Configure Credentials**

```bash
# Step 1: Set up your API Key
/sl youtube setup 

# Step 2: Set your Channel ID
/sl youtube set 
```

**Example:**

```bash
/sl youtube setup AIzaSyAbc123Def456Ghi789Jkl012Mno345Pqr
/sl youtube set UCa1b2c3d4e5f6g7h8i9j0k1l2m3n
```

**Response:**

```
[StreamLink] YouTube API Key saved!
[StreamLink] Next: Set your channel with /streamlink youtube set <channel_id>
[StreamLink] YouTube channel ID set to: UCa1b2c3d4e5f6g7h8i9j0k1l2m3n
```

**Start Your Stream and Connect**

```bash
# Step 3: Start your live stream on YouTube (with chat enabled)

# Step 4: Connect to chat
/streamlink youtube connect
```

**Success Messages:**

```
[StreamLink] Validating credentials...
[StreamLink] API Key validated!
[StreamLink] Connecting to YouTube live chat...
[StreamLink] Connected to YouTube live chat
```

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kentatetsu.gitbook.io/streamlink/guides/youtube-setup-guide/configure-streamlink.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
