API Tutorial: Part 2 - Connect and Test (PHP/cURL)

In the following process we now need the two keys, Client and Secret, which were generated in the API example part 1 by adding an API access through the TSI. Furthermore, a suitable source code editor, such as Notepad++ or PhpStorm would be advantageous for the following steps, even if you could theoretically use a normal editor.

As mentioned in the title below, we use PHP as the programming language and the PHP extension cURL to communicate with the Teamspeak interface via the interface. In order to make it as easy as possible for beginners, I also use a predefined class called "curl / curl", which should make your work easier.

To access the class "Curl" as in the following script, visit the website https://github.com/php-mod/curl, download the class and copy all files into any subfolder, in this example use I use "curl" as the directory name.

I hope that the example shown above provides a reasonable understanding of how the interface works. If there are any questions, just leave a comment on this article. In the next part, I will show you an example of how to add a new TSI user.