Connecting to twitch via IRC with SSL¶
This short how-to is geared toward Linux users.
This includes WSL2.
I highly recommend you use weechat's encrypted storage to store your access token.
Table of Contents¶
- Install Weechat
- Get OAuth Token
- Connecting to twitch with weechat
- Securely Store your OAuth Token (RECOMMENDED)
- Connect & Disconnect Commands for Twitch IRC
- Some Useful Keybinds and Commands
- tl;dr, just gimme the commands
Install Weechat¶
Use your package manager to install weechat.
Get OAuth Token¶
Get your oauth token here.
The Access Token is the OAuth token you need to connect.
Connecting to twitch with weechat¶
Adding the twitch server¶
/server add <name> adds a server with a given name.
Let's add the twitch server. You'll need your OAuth token, so be sure you generated one!
/server add twitch irc.chat.twitch.tv/6697 -ssl -ssl_verify -password=oauth:youraccesstoken -nicks=yourusername
Breakdown:
twitch: The name you give to the server. This is what you will/connectto.irc.chat.twitch.tv/6697: The link/port to the server.6697is the secure port.-ssl: Enables SSL/TLS for a secure connection.-ssl_verify: Enables SSL certificate verification for security.-password=oauth:youraccesstoken: The password that will be used to connect to the server.- This must contain the
oauth:part. - NOTE: This stores your key in plaintext.
- See this section for encrypted storage of your oauth token.
- This must contain the
-nicks=username: The username of your twitch account.
Optionally, you can add -autoconnect to connect to this server when weechat launches.
Securely Store your OAuth Token (RECOMMENDED)¶
You can utilize Weechat's secure encrypted storage to lock your Twitch token behind a passphrase.
Use /secure set to set a "secure variable."
password to read from this variable.
Set your passphrase.
- NOTE: If you don't set up a passphrase, the token will be stored in PLAIN TEXT in
~/.config/weechat/sec.conf.
Then /save.
In your irc.conf (default ~/.config/weechat/irc.conf), you should see this in
the Twitch settings:
Verify it worked by relaunching weechat and connecting to twitch.
Connect & Disconnect Commands for Twitch IRC¶
Use /connect twitch and /disconnect twitch as necessary.
-
Connect to twitch:
-
Then join any given channel with
/join #channelName: -
Save your configuration:
- Just be aware, this will save your oauth token in plaintext in
~/.config/weechat/irc.conf. - Go here if you ever need to revoke the token.
- Just be aware, this will save your oauth token in plaintext in
Some Useful Keybinds and Commands¶
-
/autojoin add #channel_name: Add a channel to auto-join when weechat starts.- Remember to
/saveafter doing this.
- Remember to
-
Use
Alt-<NUM>to switch channels (channels are numbered, shown on left).Alt-1to show the main system buffer.
/quitto close weechat/partto disconnect from a channel./closeto close a buffer (the channel window).
-
To set up autoconnect after adding the server, use
/set: -
WeeChat supports tab completion for commands.
tl;dr, just gimme the commands¶
-
- Grab the
Access Token
- Grab the
-
Install and launch:
-
Add the Twitch server (inside weechat)
/server add irc.chat.twitch.tv/6697 -ssl -ssl_verify -nicks=YOUR_USERNAME -password=oauth:YOUR_TOKEN -autoconnect- You must include the
oauth:in the-password.
- You must include the
-
Connect to a Twitch channel
-
To leave a channel:
-
To quit weechat:
Now you've got a minimal weechat setup for twitch!