You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,5 +268,67 @@ Add Browser Sources in OBS pointing to the local server (e.g., `http://localhost
268
268
* `vlx.join` : Bot joins your voice channel and starts the SRT stream.
269
269
* `vlx.leave`: Bot stops streaming and disconnects.
270
270
271
+
## Twitch OAuth2 Credentials and Token Configuration
272
+
273
+
VLX_ChatBridge utilizes the modern Twitch API (Helix) and IRC interfaces. To ensure security and stability, the system uses an **automatic token renewal** mechanism backed by a local database. This means you will only need to generate your tokens manually **once**, and the system will keep them valid indefinitely.
274
+
275
+
You will need two sets of credentials: the Application credentials and the User Tokens (one for your main broadcaster channel and one for the Bot).
276
+
277
+
### Step 1: Create the Twitch Application (Client ID & Secret)
278
+
These credentials identify your software on Twitch's servers.
279
+
1. Go to the [Twitch Developer Console](https://dev.twitch.tv/console) and log in.
280
+
2. Click on **"Register Your Application"**.
281
+
3. Choose a name for your app (e.g., `VLX_ChatBridge_App`).
282
+
4. In **OAuth Redirect URLs**, enter: `http://localhost`
283
+
5. In **Category**, select `Chat Bot`.
284
+
6. Click "Create". Once created, click "Manage" to get your **Client ID** and generate a **Client Secret**.
285
+
7. Insert these two values into the `vlx_chatbridge.conf` file under the `twitch` section.
286
+
287
+
### Step 2: Generate Tokens (Access & Refresh)
288
+
ChatBridge requires explicit authorization to act as both a Bot and the channel owner (e.g., to delete messages for the Auto-Delete feature).
289
+
290
+
The fastest way to generate the initial tokens is by using a secure site like [Twitch Token Generator](https://twitchtokengenerator.com/):
291
+
1. Go to the site and scroll down to the **"Custom Scope Token"** section.
292
+
2. You will need to generate **TWO** distinct tokens. Log in to Twitch first with your **Bot** account, and then repeat the process with your **Broadcaster** account (your main channel).
293
+
294
+
#### Required Permissions (Scopes)
295
+
Select the following boxes with extreme care. It is highly recommended to include all these scopes to ensure compatibility with moderation features and future expansions of the bridge:
296
+
297
+
**For the BOT account (e.g., VirusRoboLox):**
298
+
Check these boxes, then click "Generate Token" while logged in with the bot profile:
299
+
* `chat:read` (Required to read commands)
300
+
* `chat:edit` (Required to reply in chat)
301
+
* `channel:moderate` (Required for basic moderation actions)
302
+
* `whispers:read` and `whispers:edit` (If the bot uses whispers)
303
+
304
+
**For the BROADCASTER account (Your main channel):**
305
+
Return to the site, check these boxes, and log in with your main account:
306
+
* `moderator:manage:chat_messages` (**REQUIRED** for the Auto-Delete command feature to work)
* `channel:manage:broadcast` (To update stream info via commands)
309
+
* `channel:read:subscriptions` (To intercept subs via API)
310
+
* `moderation:read` (To read chat state)
311
+
* `chat:read` and `chat:edit` (For security fallback)
312
+
313
+
*Note: Once generated, the site will provide two long strings for each account: an `ACCESS TOKEN` and a `REFRESH TOKEN`. Copy them and keep them safe.*
(Tip: You can find Twitch account numeric IDs using free sites like Twitch Insights or StreamWeasels).
330
+
331
+
Once inserted, make sure your vlx_chatbridge.conf file has the bot_id: "BOT_NUMERIC_ID"entry configured. From this moment on, ChatBridge will manage the tokens completely autonomously, silently renewing them before they expire. You will never have to repeat this procedure!
332
+
271
333
## License
272
334
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
0 commit comments