TwitchSpawn
Search…
πŸ“—
Configuring Credentials
This page will help you configure your credentials.toml file properly
TwitchSpawn uses a well-known data transporting library called SocketIO to communicate with various streaming platforms' Socket APIs. In the sake of authenticating inbound connection, those APIs require a long string data called a socket token. Therefore in order for TwitchSpawn to connect to those APIs, we need to let it know what our socket token is.
The tokens you put in credentials.toml are not sent to anywhere else than the platform's Socket API. Therefore, your tokens are safe as long as you do not share them or credentials.toml with any untrusted source.
However, if somehow you think your tokens are in wrong hands, you can always reset them in the platform's settings.

Where to find your Socket Token?

Streamlabs
StreamElements
Finding your socket token is quite easy on Streamlabs! You can start off by logging into your Streamlabs account on https://streamlabs.com/​
You can login with Twitch, Youtube or any other platform you desire
After logging into your account, you can see Settings section on the left menu. Navigate there.
Under Settings, you can see API Settings tag, and another tab under that called API Tokens. Nagivate there and you'll see your Socket Token unrevealed. You'll need that token in credentials.toml.
There are one tab "API Tokens" embedded under another tab "API Settings"
Socket API Token is the one we are looking for
Finding your socket token is quite easy on StreamElements! You can start off by logging into your StreamElements account on https://streamelements.com/​
You can login with Twitch or any other platform you desire
After logging into your account, you'll be redirected to the dashboard. On top you can see your Twitch nickname. Click on it to see your account details.
Your Twitch nick is being displayed there. It is clickable!
On your account details page, you'll see a little Show secrets switch. Switch it on to see your Socket Token (which is called a JWT Token in their interface). You'll need that token in credentials.toml.
The Socket Token (JWT token) is shown after "Show secrets" is turned on
Those pages are NOT provided/designed by the developers of TwitchSpawn, therefore the way you find your Socket Tokens might change over time. If you cannot find your Socket Token by following the way explained in this page, consider reaching us on our Discord Server!

Plugging in the Socket Token(s)

The credentials config file is a TOML file. It is consisted of 3 arrays.
array name
description
moderatorsTwitch
Nicknames of the moderators in Twitch. It is a String array.
moderatorsMinecraft
Nicknames of the moderators in Minecraft. It is a String array.
streamers
Array of streamer credentials. Every streamer object must have 4 important data. Their Twitch and Minecraft nicks, the platform being used and the socket token retrieved from that platform.
With all the information you retrieved from the platform of choice, it is rather easy to fill the file. However since TOML is a case sensitive language, try not to change field names (E.g socketToken β‰  SocketToken). Exemplar credentials.toml files can be found below:
With One Streamer
With Multiple Streamers
credentials.toml
moderatorsTwitch = [ "TheDiaval" ] # You can have as many names as you desire
moderatorsMinecraft = [ "Neeta", "Pomapi", "Toastnomnomnom" ]
​
[[streamers]]
minecraftNick = "iGoodie"
twitchNick = "iGoodiex"
platform = "Streamlabs"
token = "YOUR_SOCKET_TOKEN_HERE"
credentials.toml
moderatorsTwitch = [] # It can also be empty
moderatorsMinecraft = [ "Neeta", "Pomapi" ]
​
[[streamers]]
minecraftNick = "iGoodie"
twitchNick = "iGoodiex"
platform = "Streamlabs"
token = "YOUR_SOCKET_TOKEN_HERE"
[[streamers]]
minecraftNick = "Toastnomnomnom"
twitchNick = "ToastNomNomNom"
platform = "StreamElements"
token = "YOUR_SOCKET_TOKEN_HERE"
​
# You can add as many streamers as you desire
Also while filling nicknames, beware that they are case sensitive as well. Be sure you fill them considering the case sensitivity (E.g igoodie β‰  iGoodie).
Copy link
On this page
Where to find your Socket Token?
Plugging in the Socket Token(s)