TeamSpeak Server 3.12.x

Today we released version 3.12.0 of our TeamSpeak server.

  • With this release we introduce a new way to interact with the Query using http(s) and json.
    In this server version the WebQuery must be enabled manually or else only ServerQuery is enabled.
    A small tutorial for this can be found at the end of this post.
  • A whisper bug when user did reconnect and no longer could whisper got fixed.
  • On Windows older CPUs without POPCNT support can use the 32bit version again.
    Linux, FreeBSD and MacOS are not affected to this issue and change.
  • Snapshots version was raised to ver 3. This was needed for the WebQuery feature .

Click and read me when you used the 3.12.0 beta on Maria DB

Seriously!! ignore this when you haven’t used the 3.12.0 Beta in combination with MariaDB before.

You may get errors when you try to create an API key
We raised the length for column VARCHAR to 44. But the server can not update the value in the database. This needs to be done manually.

You need to go into the table api_keys and modify the column api_key_hash to varchar 44 instead of 40.
Sorry can not post the full command on forum.

Here is the complete changelog.

## Server Release 3.12.0 18 March 2020

### Important
- New feature WebQuery that allows user to access to query system using http(s) and json. 

### Added
- New query commands `apikeyadd`, `apikeydel` and `apikeylist`
  for managing API keys used in WebQuery
- New permissions `b_virtualserver_apikey_add` and `b_virtualserver_apikey_manage` that restrict who can create/delete/list API keys.
- New possible value for parameter `query_protocols` named `http` and `https` that enables WebQuery
- New parameters `query_http_ip` and `query_http_port` that define where WebQuery can be reached, default is all interfaces on port `10080`
- New parameters `query_https_ip` and `query_https_port` that define where WebQuery can be reached, default is all interfaces on port `10443`

### Changed
- macOS 10.14 Mojave is required from now on
- Raised version of snapshots and added support for API keys 

### Fixed
- Whisper bug that resulted in users not being able to receive whispers
- Removed requirement of having a cpu with POPCNT for 32bit version, and added an appropriate error message for the 64bit version
- Deploying snapshots will import client and channel permissions, again

>>> Download Server <<<

Docker users usually get their update within a day. So please be patient and wait at least 32 hours before reporting back to us.


Click here to see a mini tutorial about WebQuery .

How to use:

  • start ts3server with WebQuery enabled ./ts3server query_protocols=raw,ssh,http,https
  • create a universal API key. (BAByFoiEXZfnSJyE6dbXFiW_nn_SdwkclpKNz9j in the example)
    $ nc -q1 localhost 10011 <<EOF
    login serveradmin password
    apikeyadd scope=manage lifetime=0
    EOF
    
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    error id=0 msg=ok
    apikey=BAByFoiEXZfnSJyE6dbXFiW_nn_SdwkclpKNz9j id=4 sid=0 cldbid=1 scope=manage time_left=unlimited created_at=1582102492 expires_at=1582102492
    error id=0 msg=ok
    
  • testing the API key
    $ curl -H 'x-api-key: BAByFoiEXZfnSJyE6dbXFiW_nn_SdwkclpKNz9j' 'http://127.0.0.1:10080/gm?msg=Hello+World'
    
    {"status":{"code":0,"message":"ok"}}
    
    $ curl -H 'x-api-key: BAByFoiEXZfnSJyE6dbXFiW_nn_SdwkclpKNz9j' 'http://127.0.0.1:10080/1/channellist?-topic&-icon'
    
    {"body":[{"channel_icon_id":"0","channel_name":"Default Channel","channel_needed_subscribe_power":"0","channel_order":"0","channel_topic":"Default Channel has no topic","cid":"1","pid":"0","total_clients":"1"}],"status":{"code":0,"message":"ok"}}
    
Here is an overview for the scopes and the commands that can be used with these scopes
{ "apikeyadd",                   { manage_scope, } },
  { "apikeydel",                   { manage_scope, } },
  { "apikeylist",                  { manage_scope, } },
  { "banadd",                      { manage_scope, write_scope, } },
  { "banclient",                   { manage_scope, write_scope, } },
  { "bandel",                      { manage_scope, write_scope, } },
  { "bandelall",                   { manage_scope, write_scope, } },
  { "banlist",                     { manage_scope, write_scope, read_scope, } },
  { "bindinglist",                 { manage_scope, read_scope } },
  { "channeladdperm",              { manage_scope, } },
  { "channelclientaddperm",        { manage_scope, } },
  { "channelclientdelperm",        { manage_scope, } },
  { "channelclientpermlist",       { manage_scope, write_scope, read_scope, } },
  { "channelcreate",               { manage_scope, write_scope, } },
  { "channeldelete",               { manage_scope, write_scope, } },
  { "channeldelperm",              { manage_scope, } },
  { "channeledit",                 { manage_scope, write_scope, } },
  { "channelfind",                 { manage_scope, write_scope, read_scope, } },
  { "channelgroupadd",             { manage_scope, write_scope, } },
  { "channelgroupaddperm",         { manage_scope, } },
  { "channelgroupclientlist",      { manage_scope, write_scope, read_scope, } },
  { "channelgroupcopy",            { manage_scope, } },
  { "channelgroupdel",             { manage_scope, } },
  { "channelgroupdelperm",         { manage_scope, } },
  { "channelgrouplist",            { manage_scope, write_scope, read_scope, } },
  { "channelgrouppermlist",        { manage_scope, write_scope, read_scope, } },
  { "channelgrouprename",          { manage_scope, } },
  { "channelinfo",                 { manage_scope, write_scope, read_scope, } },
  { "channellist",                 { manage_scope, write_scope, read_scope, } },
  { "channelmove",                 { manage_scope, write_scope, } },
  { "channelpermlist",             { manage_scope, write_scope, read_scope, } },
  { "clientaddperm",               { manage_scope, } },
  { "clientdbdelete",              { manage_scope, write_scope, } },
  { "clientdbedit",                { manage_scope, write_scope, } },
  { "clientdbfind",                { manage_scope, write_scope, read_scope, } },
  { "clientdbinfo",                { manage_scope, write_scope, read_scope, } },
  { "clientdblist",                { manage_scope, write_scope, read_scope, } },
  { "clientdelperm",               { manage_scope, } },
  { "clientedit",                  { manage_scope, write_scope, } },
  { "clientfind",                  { manage_scope, write_scope, read_scope, } },
  { "clientgetdbidfromuid",        { manage_scope, write_scope, read_scope, } },
  { "clientgetids",                { manage_scope, write_scope, read_scope, } },
  { "clientgetnamefromdbid",       { manage_scope, write_scope, read_scope, } },
  { "clientgetnamefromuid",        { manage_scope, write_scope, read_scope,} },
  { "clientgetuidfromclid",        { manage_scope, write_scope, read_scope, } },
  { "clientinfo",                  { manage_scope, write_scope, read_scope, } },
  { "clientkick",                  { manage_scope, write_scope, } },
  { "clientlist",                  { manage_scope, write_scope, read_scope, } },
  { "clientmove",                  { manage_scope, write_scope, } },
  { "clientpermlist",              { manage_scope, write_scope, read_scope, } },
  { "clientpoke",                  { manage_scope, write_scope, } },
  { "clientsetserverquerylogin",   { manage_scope, write_scope, } },
  { "clientupdate",                { manage_scope, write_scope, } },
  { "complainadd",                 { manage_scope, write_scope, } },
  { "complaindel",                 { manage_scope, write_scope, } },
  { "complaindelall",              { manage_scope, write_scope, } },
  { "complainlist",                { manage_scope, write_scope, read_scope, } },
  { "custominfo",                  { manage_scope, write_scope, read_scope, } },
  { "customsearch",                { manage_scope, write_scope, read_scope, } },
  { "customset",                   { manage_scope, write_scope, } },
  { "customdelete",                { manage_scope, write_scope, } },
  { "ftcreatedir",                 not_supported },
  { "ftdeletefile",                not_supported },
  { "ftgetfileinfo",               not_supported },
  { "ftgetfilelist",               not_supported },
  { "ftinitdownload",              not_supported },
  { "ftinitupload",                not_supported },
  { "ftlist",                      not_supported },
  { "ftrenamefile",                not_supported },
  { "ftstop",                      not_supported },
  { "gm",                          { manage_scope, } },
  { "help",                        { manage_scope, write_scope, read_scope, } },
  { "hostinfo",                    { manage_scope, write_scope, read_scope, } },
  { "instanceedit",                { manage_scope, } },
  { "instanceinfo",                { manage_scope, write_scope, read_scope, } },
  { "logadd",                      { manage_scope, write_scope, } },
  { "login",                       not_supported },
  { "logout",                      not_supported },
  { "logview",                     { manage_scope, write_scope, read_scope, } },
  { "messageadd",                  { manage_scope, write_scope, } },
  { "messagedel",                  { manage_scope, write_scope, } },
  { "messageget",                  { manage_scope, write_scope, read_scope, } },
  { "messagelist",                 { manage_scope, write_scope, read_scope, } },
  { "messageupdateflag",           { manage_scope, write_scope, } },
  { "permfind",                    { manage_scope, write_scope, read_scope, } },
  { "permget",                     { manage_scope, write_scope, read_scope, } },
  { "permidgetbyname",             { manage_scope, write_scope, read_scope, } },
  { "permissionlist",              { manage_scope, write_scope, read_scope, } },
  { "permoverview",                { manage_scope, write_scope, read_scope, } },
  { "permreset",                   { manage_scope, } },
  { "privilegekeyadd",             { manage_scope, write_scope, } },
  { "privilegekeydelete",          { manage_scope, write_scope, } },
  { "privilegekeylist",            { manage_scope, write_scope, read_scope, } },
  { "privilegekeyuse",             { manage_scope, write_scope, } },
  { "queryloginadd",               { manage_scope, write_scope, } },
  { "querylogindel",               { manage_scope, write_scope, } },
  { "queryloginlist",              { manage_scope, write_scope, read_scope } },
  { "quit",                        not_supported },
  { "sendtextmessage",             { manage_scope, write_scope, } },
  { "servercreate",                { manage_scope, } },
  { "serverdelete",                { manage_scope, } },
  { "serveredit",                  { manage_scope, write_scope, } },
  { "servergroupadd",              { manage_scope, } },
  { "servergroupaddclient",        { manage_scope, } },
  { "servergroupaddperm",          { manage_scope, } },
  { "servergroupautoaddperm",      { manage_scope, } },
  { "servergroupautodelperm",      { manage_scope, } },
  { "servergroupclientlist",       { manage_scope, } },
  { "servergroupcopy",             { manage_scope, } },
  { "servergroupdel",              { manage_scope, } },
  { "servergroupdelclient",        { manage_scope, } },
  { "servergroupdelperm",          { manage_scope, } },
  { "servergrouplist",             { manage_scope, } },
  { "servergrouppermlist",         { manage_scope, } },
  { "servergrouprename",           { manage_scope, } },
  { "servergroupsbyclientid",      { manage_scope, } },
  { "serveridgetbyport",           { manage_scope, } },
  { "serverinfo",                  { manage_scope, } },
  { "serverlist",                  { manage_scope, } },
  { "servernotifyregister",        not_supported },
  { "servernotifyunregister",      not_supported },
  { "serverprocessstop",           { manage_scope, } },
  { "serverrequestconnectioninfo", { manage_scope, write_scope, read_scope, } },
  { "serversnapshotcreate",        { manage_scope, } },
  { "serversnapshotdeploy",        { manage_scope, } },
  { "serverstart",                 { manage_scope, } },
  { "serverstop",                  { manage_scope, } },
  { "servertemppasswordadd",       { manage_scope, write_scope, } },
  { "servertemppassworddel",       { manage_scope, write_scope, } },
  { "servertemppasswordlist",      { manage_scope, write_scope, read_scope, } },
  { "setclientchannelgroup",       { manage_scope, write_scope, } },
  { "tokenadd",                    { manage_scope, write_scope, } },
  { "tokendelete",                 { manage_scope, write_scope, } },
  { "tokenlist",                   { manage_scope, write_scope, read_scope, } },
  { "tokenuse",                    { manage_scope, write_scope, } },
  { "use",                         not_supported },
  { "version",                     { manage_scope, write_scope, read_scope, } },
  { "whoami",                      { manage_scope, write_scope, read_scope, } },
21 Likes

:sunglasses::+1:

6 Likes

How to do that

Do we get a complete documentation of the query? The current is heavy to handle.

we are currently working on a complete new documentation for web-query.
As a rule of thumb the webquery has all the commands and there arguments as the query has.

3 Likes

For start you can use the small one attached in the main post and the commands that are possible to use are the same as in the ServerQuery documantion.

1 Like

Thanks!

Thanks and good update!

1 Like

nicely done :face_with_monocle:

Hello I want to know how exactly download or find webquery (windows)

There’s nothing to download or install.
It’s a protocol build into the latest server version.

(1) You need to enable webquery in your ts3server.ini or add it as start parameter.

(2) You need to create an API key via. SSH or the default query method.

(3) You need to know the API key and defined/default http(s) port to build the URL.

(4) Use cURL for example or your browser (why so ever) to send commands.

1 Like

thanks for reply but I don’t have ts3server.ini where i change start parameter

As Chris mentioned:

Similar to use on Windows:
(for example in your command prompt)

ts3server.exe query_protocols=raw,ssh,http,https

1 Like

this is worked and how can now access webquery to send commands

You need to send a HTTP(s) request to the server.

$ curl -H 'x-api-key: BAByFoiEXZfnSJyE6dbXFiW_nn_SdwkclpKNz9j' 'http://127.0.0.1:10080/gm?msg=Hello+World'

cURL is also available in your Windows console prompt if it’s not a server version.

Or use your browser if it’s able to send additional headers (x-api-key).

1 Like

1 Like

Please use " instead of ’ in the Windows console prompt.
Run the console prompt as admin, please.
(I could be wrong with this but I can’t test it atm)

(1) Your default server port is 9987 not the webquery protocol Port.

(2) You need to enable the webquery protocol before you can use it.

(3) You need to generate your own API key.

Using the one in my example doesn’t work.
Please read Chris post above the get the default ports for http/https requests.

1 Like

1 Like

This method doesn’t work either.
You have defined the command as header.

That’s exactly what the API key is for.
It’s used to be send as x-api-key header.

1 Like

Read the post a little more carefully :slight_smile: you’re trying to use http against a serverquery port…

1 Like
twitch instagram twitter facebook