Intermediate 20 min

Query Server & API TeamSpeak 3

Enable query SSH/HTTP, secure query passwords, bots statuses and web integrations with TS3.

#Query#API#Bot

Ready to start your service? Check offers and order online.

View offers and order

Query Server & API TeamSpeak 3

The ServerQuery TeamSpeak 3 is a TCP text interface (port 10011) to automate administration, bots status, web panels and Discord integrations. This guide covers activation, security, essential commands and best practices on hosted server.

What is ServerQuery?

Command line protocol: TCP connection, login, execution commands (clientlist, channelcreate, sendtextmessage...). Used by TS3StatusBot, Auron, PHP panels, etc.

Prerequisite

  • TS3 online, start
  • Port 10011 accessible (limited IP recommended)

Enable & Secure Query

  1. Default query identifiers visible to the first setup, change them immediately
  2. Client TS3 → Tools → Options → Application → Query, or file query_ip_whitelist.txt
  3. Add only IP of your bots/panels to the whitelist
  4. Create a dedicated query account by bot with minimum permissions
  5. Disable login query Guest if exposed publicly
A Query open on the Internet without whitelist is a possible gateway, brute force and server control.

First query connection (example)

telnet IP 10011
login client_login_name=admin client_login_password=VOTRE_MDP
use port=9987
clientlist

Replace by TS3 Query library in Python/Node for bots production.

Useful orders

  • clientlist, players connected
  • channelcreate channel_name=Salon password=xxx
  • sendtextmessage targetmode=3 msg=Annonce serveur
  • banadd ip=xxx.xxx.xxx.xxx time=3600
  • serversnapshotcreate, automated backup

Bots & integrations

  • Web Status, displays number connected on site
  • Discord bridge, sync presence or channel creation
  • Anti-AFK / moderation, kick auto according to rules

HTTP Query (plugin)

TS3 native is TCP text. Some hosts or wrappers expose HTTP, check your bot's doc. Otherwise run the bot on VPS with whitelist Query access.

Troubleshooting

  • error id=520 invalid login, wrong query identifiers
  • Connecting refused 10011, firewall, TS3 stopped, wrong IP
  • Flood ban query, too many queries, space bot calls

See also: permissions, security.