Skip to content

Configuration file

Noxalus edited this page Sep 9, 2017 · 4 revisions

Configuration file

To get messages from different chat services, you need to enter your personal information in the file called config.json at the root folder. A basic structure of this file is given as example into config.template.json and looks like that:

{
    "host": "http://localhost",
    "port": 4242,
    "whitelisted_ips": [
        "127.0.0.1",
        "::1"
    ],
    "live_data": {
        "youtube": {
            "enabled": true,
            "client_id": "MY_CLIENT_ID",
            "client_secret": "MY_CLIENT_SECRET",
            "redirect_url": "/youtube/callback"
        },
        "twitch": {
            "enabled": true,
            "channel": "MY_CHANNEL"
        },
        "hitbox": {
            "enabled": true,
            "channel": "MY_CHANNEL"
        },
        "beam": {
            "enabled": true,
            "username": "MY_USERNAME",
            "password": "MY_PASSWORD"
        },
        "dailymotion": {
            "enabled": true,
            "room": "MY_ROOM",
            "grosminet_endpoint": "http://dmchat.dailymotion.com:80"
        }
    }
}

Youtube Gaming

Setup the Youtube Gaming section of the configuration file is the most difficult part because you can't access to the chat messages using the officiel Youtube Data API without being connected using the OAuth 2.0 authentification protocol. This also means that it needs at least one user interaction before to begin to retrieve Youtube Gaming chat messages.

Here is the needed data for Youtube part of the configuration file:

"youtube": {
    "enabled": true,
    "client_id": "MY_CLIENT_ID",
    "client_secret": "MY_CLIENT_SECRET",
    "redirect_url": "/youtube/callback"
}

client_id and client_secret are generated when you create an application with OAuth 2.0 access like explained in the Google documentation.

redirect_url should be let like that, but you must make sure to add the complete URL to the redirect URIs list when you will create your Google application. For local testing, the complete redirect URI should looks like this: http://localhost:4242/youtube/callback.

Twitch

For Twitch, just type your username for the channel field.

Dailymotion Games

For Dailymotion Games, you need to enter the ID of your live room in the room field. This ID is composed of your username and the video ID of your live like this: [USERNAME]-[VIDEO_ID]

If you look to the URL of your live page, you can grap easily these informations: http://games.dailymotion.com/[USERNAME]/v/[VIDEO_ID]

Hitbox

For Hitbox, just type your username for the channel field.

Beam

For Beam, you only need to enter your username and your password in the associated fields.

Clone this wiki locally