External Commands

Actions that reach outside the game: keys, HTTP requests, programs, OBS, Streamer.bot, your own tools, game server commands (RCON), MQTT and WebSocket.

External Commands are actions that do something outside the game when a viewer sends a gift or writes in chat — press a key, turn on your smart lights, switch the OBS scene. They are in every mod and every custom integration, on every plan, with TikFinity triggers or with native TikTok, Kick and Twitch triggers.

Add an external command

  1. On the Actions tab, click Add new and choose the trigger.
  2. In All Actions, open the External tab.
  3. Click Configure next to the command, fill in its settings, and save.

A command runs Counts times with the row's Interval between runs, like any action. It doesn't need the game: a mod or integration only has to be switched on.

The commands

CommandWhat it does
KeystrokePresses keys or mouse buttons in the window that has focus.
WebhookSends an HTTP request to a URL.
Execute programStarts a program or script.
Streamer.botRuns an action in Streamer.bot.
OBSSwitches a scene or shows/hides a source in OBS Studio.
Third-Party ActionRuns an action in your own app — see Third-Party Interface.
RCONSends console commands to a game server: Minecraft, Rust, CS2, ARK, Palworld and others.
WebSocketSends a message to your own WebSocket server: Node-RED, Home Assistant, your own app.
MQTTPublishes a message to an MQTT broker: smart lights, plugs and other devices.

Keystroke

Set a Key sequence, optional Modifiers, Special keys or Mouse buttons, and Hold duration (ms) (100 by default). Keep Game Mode on for games; turn it off to type into ordinary apps or a chat.

Webhook

Enter the URL (http or https) and the method — POST with a JSON body by default; GET, PUT, PATCH and DELETE are also available. Variables like {username} or {giftName} are filled in in the URL, headers and body, and every method except GET also sends all event details in the body. BakoshApp waits up to 10 seconds for the answer.

Execute program

Pick an .exe, .bat, .cmd or .ps1 file with Browse, and optionally add Arguments (variables work here too). Wait for process to finish makes the next run wait until the program exits.

Streamer.bot

First connect Streamer.bot in Settings → Streamer.bot (by default 127.0.0.1, port 8080; the WebSocket server has to be on in Streamer.bot, and if authentication is on there, enter its password). Then pick the Streamer.bot action to run. The event details are passed to it as arguments, available in Streamer.bot as %username%, %giftName% and so on.

It also works the other way round: a Streamer.bot action can start a row. See Streamer.bot triggers.

OBS

First connect OBS in Settings → OBS (by default 127.0.0.1, port 4455, and the password of the OBS WebSocket server). Then choose Switch scene or Toggle source:

  • Permanent / Set state — the change stays.
  • Time based — the change is undone after Duration seconds (5 by default): OBS switches back to the previous scene, or hides the source again.

RCON

Choose the Connection and write the Commands, one per line, like in the server console. Setting up RCON on your server, the built-in connections to BakoshApp's own Minecraft and Rust servers and example commands are in Minecraft server commands from TikTok LIVE (RCON).

WebSocket

First add your server in Settings → Connections → WebSocket servers: the Address (ws:// or wss://) and, if the server asks for them, Headers (one per line, Name: Value), a Message after connecting (a login) and a Subprotocol. Put tokens in the headers or the login message, not in the address: those two are stored encrypted.

In the action, choose the Connection and the Format — JSON or Text — and write the Message. In JSON, put variables inside strings ("{nickname}"); a number variable like {repeatCount} can stand without quotes, and a viewer's name can't break the JSON. {seq} is the number of the message on this connection, for APIs that want a growing id. Send test shows the server's first answer.

MQTT

First add your broker in Settings → Connections → MQTT brokers: Server address, Port (1883, or usually 8883 with TLS (encrypted connection)), and User name and Password if the broker asks for them. A broker with its own certificate needs its CA certificate (optional) file — certificate checks are never turned off.

In the action, choose the Connection, the Topic (like home/lamp/set; a variable fills one level of it), the Format, the Message, QoS and Retain. With the Mode On, then off, BakoshApp sends the Message to turn on, waits Turn off after seconds and sends the Message to turn off to the same topic — a lamp that lights up for 5 seconds on a gift.

Voicemod

Changes your voice in Voicemod for a while or for good, mutes your microphone or plays a sound from your Voicemod soundboard. Setting it up is in Voicemod voice changer for TikTok LIVE gifts.

Smart Light

Colors a Govee lamp, makes it flash or pulse, or turns it off, for a while or for good. Setting up the lamp and the action is in Smart lights for TikTok LIVE gifts.

Smart Plug

Switches a TP-Link Tapo or Kasa plug, or any plug in Home Assistant: on, off or the other way round, for a while or for good. Setting up the plug and the action is in Smart plugs for TikTok LIVE gifts.

Connections for RCON, WebSocket and MQTT

RCON, WebSocket and MQTT actions send through the connections in Settings → Connections — you can keep several servers and brokers, and each action picks one. Save and test checks a connection right away, and the dot next to it shows its state — hover it for Connected, Connection error or Password refused. BakoshApp keeps the connection open between actions, so a burst of gifts doesn't log in again for every gift.

Connections stay on this PC: passwords and tokens are encrypted for your Windows account and never go to the server or into presets. An action finds its connection by name, so on another PC create a connection with the same name, or pick one in Configure.

Variables

Webhook, Execute program, Streamer.bot, RCON, WebSocket and MQTT can use the details of the event that ran the action: username, nickname, eventType, giftName, giftId, repeatCount, diamondCount, likeCount, profilePictureUrl and subMonth. RCON, WebSocket and MQTT also offer comment (the chat message) and platform (tiktok or kick). From TikFinity, only username is available.

TikFinity triggers pass the same details: the viewer's name and avatar, the gift and the like count.

A viewer's name or comment can't take over a command: in RCON commands BakoshApp removes ;, quotes, brackets, \ and @ from it, in an MQTT topic it can't add levels, and in JSON it stays inside its string.

Commands in a preset from someone else

When another account sends you a preset, its Execute program, Keystroke, RCON, WebSocket and MQTT actions arrive switched off: they would start programs or press keys on your PC, or send commands to your servers and devices. Check their settings and turn them on in Actions, or tick Keep them on — I trust the sender when you accept the preset. Your OBS, Streamer.bot and Third-Party settings and your Connections stay as you set them in Settings — they aren't part of a preset.

Ideas

  • Press a key in any game when someone sends a gift — honk, jump, shoot.
  • Turn on your smart lights with an HTTP request when you get a new follower.
  • Run a script on a subscription.
  • Switch the OBS scene for 10 seconds when a big gift arrives.
  • Give every player on your Minecraft server a diamond for a rose, with RCON.
  • Flash a smart lamp for 5 seconds on a big gift, with MQTT.

Common questions

Where are the passwords of my connections kept? Only on this PC, encrypted for your Windows account. They never go to the BakoshApp server or into presets, and a saved password isn't shown again: the field says "Saved. Type to replace".

Do RCON, WebSocket and MQTT need a game mod? No. Like every external command, they run as soon as the mod or integration is switched on.