Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 1 of 1
  1. #1
    Join Date
    July 2002

    How to integrate large existing user bases into TeamSpeak 3

    How to integrate large existing user bases (e.g. from a forum/website/MMO) into the TS3 authentication system.

    This post is for you if you have large community that are already authenticated (e.g. by user+password) on your game, forum or website and you would like allow these members access to a TeamSpeak 3 server.

    In this post we talk a lot about forum members, which might as well in your scenario be community members of something entirely different than a forum, just substitute "forum" with whatever platform your community is built on.

    Use cases are:
    Only members: You want to create a TeamSpeak 3 server but want only forum members to be able to join (and a server password won't work for you because your community is too large to keep secrets or because you want to be able to revoke join privileges without hassle).
    Special privileges: You wish to assign custom server or channel groups to your members depending on their forum rank or post count etc.

    Harnessing the powers of TeamSpeak 3 allows you to create a very user friendly and simple interface to get your users onto TeamSpeak 3, but there will be some coding work to be done on the forum (developer side) to make this possible. Let's look at the two perspectives, user and developer:

    Forum users view:

    After logging in you will see a link "Join our TeamSpeak 3 server" which will take you to a separate page telling you to download and install the TeamSpeak 3 client (if not already present) and then to "Click this link to connect". When you click the link your TeamSpeak 3 client will start (if not already started) and then connect to the community TeamSpeak 3 server. Optionally a dialogue will ask if you wish to bookmark this server within the TS3 Client so you don't have to go through the forums "Click this link to connect" link in the future, but can just use TS3 directly to connect. If you are banned/deleted from the Forums your TeamSpeak 3 privileges will also be revoked.

    Forum developers view:

    For each forum user (either on demand or up front, depending on what works best in your scenario) you will create a so called privilege key (previously called "token", and still called token in the serverquery interface) which is a string that authenticates a user. Use the tokenadd serverquery command to create them, the commands might look like this:
    tokenadd tokentype=0 tokenid1=7 tokenid2=0 tokendescription=automatically\screated\stoken\sfor\s$USER tokencustomset=ident=forum_user\svalue=$USER\pident=forum_id\svalue=$USER_ID
    Please refer to the tokenadd documentation for details, but take note that we are using the "tokencustomset" parameter to specify any amount of parameters that you might need to find this user in your forum user database (so to do the TS3 user <-> forum user mapping).

    Once you have the token you then need to build the ts3server:// link that lies behind the "Click here to connect". It should look something like this:

    <a href="ts3server://$USER&addbookmark=TS-Forum-Server&token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW/">Click here to connect</a>
    The "addbookmark=xyz" is optional but recommended.

    Now all you need to do is make sure privileges on TS3 are revoked/adjusted when they are changed on the forum. Say all you need is to delete TS3 accounts when you delete forum accounts. Find the code that is run when deleting a forum user, and add code that uses the serverquery interface to interface with the TS3 server, the commands could be something like this (lines beginning with ">" are sent by you, everything else is response by the server):

    > customsearch ident=forum_account pattern=$USER
    cldbid=123 ident=forum_account value=$USER
    error id=0 msg=ok
    > clientdbdelete cldbid=123
    error id=0 msg=ok
    Of course there are many more possibilities (e.g add a custom TS3 group for users with more than X posts on your forum etc.), your imagination is the limit . If you wanted to make your server Members only as described above you will need to set up your permission system to facilitate this, please read the section "Invite only servers" in this thread.
    Last edited by dante696; September 23rd, 2011 at 03:32 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: January 5th, 2015, 07:48 AM
  2. [Resolved] Does TeamSpeak integrate with Unity 3D?
    By jclbrs in forum General Questions
    Replies: 2
    Last Post: October 18th, 2012, 10:52 AM
  3. Implementing TS3 User DB into a existing System!?
    By WarHead2k in forum Server Support
    Replies: 7
    Last Post: May 13th, 2010, 02:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts