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: docs/api/connecting.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ A TAU token is required for both the realtime websocket API and the REST API. T
11
11
TAU exposes a websocket endpoint at `ws://localhost:PORT/ws/twitch-events/` for a local deployment or `wss://yourdomain:PORT/ws/twitch-events/` for a served deployment. After connecting your client to the websocket, you must send a message containing the following json object:
12
12
```
13
13
{
14
-
token: 'YOUR TOKEN HERE'
14
+
"token": "YOUR TOKEN HERE"
15
15
}
16
16
```
17
17
After receiving your token, TAU will begin to broadcast incoming twitch events to your client.
@@ -22,3 +22,23 @@ TAU also provides 2 separate REST APIs. A passthrough of the Twitch Helix API a
22
22
Authorization: Token YOUR-TOKEN-HERE
23
23
```
24
24
The Update Token Scopes page from the dashboard will allow you to add scopes to the Twitch token used by TAU.
25
+
26
+
## Connecting to Chat Bot Websockets
27
+
TAU also provides websockets for your streamer user chat, and any chat bots you have set up at `ws/chat-bots/<chat-bot-username>/` where `<chat-bot-username>` is the all-lowercase twitch username of your streamer account or any chat-bot accounts you have set up in TAU.
28
+
29
+
After connecting your client to the websocket, you must send a message containing the following json object:
30
+
31
+
```
32
+
{
33
+
"token": "YOUR TOKEN HERE"
34
+
}
35
+
```
36
+
37
+
After receiving your token, TAU will begin to broadcast incoming twitch chat events to your client. You can also send outgoing messages to be posted in chat by your bot. Simply send the following payload to the endpoint of the bot you would like to have "speak":
Copy file name to clipboardExpand all lines: docs/deployment/local.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The simplest way to deploy TAU is locally, using Docker. Setting TAU up locally
4
4
1.[Get a Twitch Client ID and Client Secret](./twitch_dev.md)
5
5
1. Copy `.env_sample` to `.env`
6
6
1. Open and edit the newly created `.env` file. Set the following values. Please do not use the `#` character in any of your passwords or secret keys.
7
-
1.`TWITCH_APP_ID` Set your twitch app client id. This is the "Client ID" available by clicking the "Manage" button for your app on this page: [https://dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps)
7
+
1.`TWITCH_CLIENT_ID` Set your twitch app client id. This is the "Client ID" available by clicking the "Manage" button for your app on this page: [https://dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps)
8
8
1.`TWITCH_CLIENT_SECRET` Set your twitch app secret. This is the "Client Secret" available by clicking the "Manage" button for your app on this page: [https://dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps) If you don't already one (or you no longer have your original one), click "New Secret". You'll only be able to see it when you first make it so put it in your password manager.
9
9
1.`TWITCH_WEBHOOK_SECRET` This secret is required for Twitch EventSub. It's one that you generate yourself (i.e. it's not the app client secret from the [dev.twitch.tv](https://dev.twitch.tv) page). The secret must be between 10-100 characters. You can use this one, or genrate one yourself.
10
10
1.`POSTGRES_PW` This is the root password which will be set for your Postgres container. You can use the password set here but it is more secure to set your own strong password. You likely wont need to directly use this password at all.
Copy file name to clipboardExpand all lines: docs/deployment/railway.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[Railway](https://railway.app/) is a cost effective way to run TAU 24/7 in the cloud. The following steps should get you started! These instructions assume you have cloned the TAU repo to your local drive, and that you have npm installed (the railway CLI app requires npm).
4
4
5
-
<!-- [](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FTeam-TAU%2Ftau%2Ftree%2Fdocumentation-railway-docs&plugins=postgresql%2Credis&envs=TWITCH_APP_ID%2CTWITCH_CLIENT_SECRET%2CTWITCH_WEBHOOK_SECRET%2CDJANGO_DB_PW%2CDJANGO_SECRET_KEY%2CDJANGO_CONFIGURATION%2CPORT&TWITCH_APP_IDDesc=Your+Twitch+TAU+app+id.&TWITCH_CLIENT_SECRETDesc=Your+Twitch+TAU+client+secret.&TWITCH_WEBHOOK_SECRETDesc=Random+string+of+10-100+characters.&DJANGO_DB_PWDesc=A+password+you+would+like+to+use+for+your+TAU+postgres+database.&DJANGO_SECRET_KEYDesc=Random+string+of+10-100+characters.&DJANGO_CONFIGURATIONDesc=DO+NOT+CHANGE&PORTDesc=DO+NOT+CHANGE&DJANGO_CONFIGURATIONDefault=Railway&PORTDefault=443&referralCode=TAU) -->
5
+
<!-- [](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FTeam-TAU%2Ftau%2Ftree%2Fdocumentation-railway-docs&plugins=postgresql%2Credis&envs=TWITCH_CLIENT_ID%2CTWITCH_CLIENT_SECRET%2CTWITCH_WEBHOOK_SECRET%2CDJANGO_DB_PW%2CDJANGO_SECRET_KEY%2CDJANGO_CONFIGURATION%2CPORT&TWITCH_CLIENT_IDDesc=Your+Twitch+TAU+app+id.&TWITCH_CLIENT_SECRETDesc=Your+Twitch+TAU+client+secret.&TWITCH_WEBHOOK_SECRETDesc=Random+string+of+10-100+characters.&DJANGO_DB_PWDesc=A+password+you+would+like+to+use+for+your+TAU+postgres+database.&DJANGO_SECRET_KEYDesc=Random+string+of+10-100+characters.&DJANGO_CONFIGURATIONDesc=DO+NOT+CHANGE&PORTDesc=DO+NOT+CHANGE&DJANGO_CONFIGURATIONDefault=Railway&PORTDefault=443&referralCode=TAU) -->
6
6
7
7
1.[Create a railway account/login](https://railway.app/login)
8
8
1.[Go to your railway dashboard](https://railway.app/dashboard)
@@ -24,10 +24,10 @@
24
24
25
25
## Sample .env data.
26
26
27
-
All `.env` data should come from your local install of TAU (see your existing `.env`). The first 6 values must be set. `TWITCH_APP_ID` and `TWITCH_CLIENT_SECRET` come from the Twitch developer settings above, `TWITCH_WEBHOOK_SECRET` should be a random string of characters 10-100 characters long. `DJANGO_DB_PW` can be any password you want to set for the Django databse user, `DJANGO_SECRET_KEY` should be a different random string of characters 10-100 characters long, and `PUBLIC_URL` should be the deployment domain, e.g.- `tau-twitchname.up.railway.app`. The last two values (`DJANGO_CONFIGURATION` and `PORT`) should use the provided values below.
27
+
All `.env` data should come from your local install of TAU (see your existing `.env`). The first 6 values must be set. `TWITCH_CLIENT_ID` and `TWITCH_CLIENT_SECRET` come from the Twitch developer settings above, `TWITCH_WEBHOOK_SECRET` should be a random string of characters 10-100 characters long. `DJANGO_DB_PW` can be any password you want to set for the Django databse user, `DJANGO_SECRET_KEY` should be a different random string of characters 10-100 characters long, and `PUBLIC_URL` should be the deployment domain, e.g.- `tau-twitchname.up.railway.app`. The last two values (`DJANGO_CONFIGURATION` and `PORT`) should use the provided values below.
0 commit comments