Connecting YouTube and TeamSpeak3

This wasn’t a requirement, but once again I was thinking about on how to make it possible. I guess, I came up with a pretty simple solution using Laravel and the TeamSpeak3 PHP API.

Logging in via YouTube on the website was simple. I used Laravel for the base system. Laravel was extended with the Socialite Package and the Socialite Providers for YouTube. Lastly, I added the TeamSpeak 3 PHP API featuring the Server Query.

Logging in with YouTube worked like a breeze, it worked right out of the box. You hit a link and you are redirected to Google to select your Google account and the matching YouTube channel. Then, you’re redirected back to the website – basically, that’s how OAuth works. Fair enough.

When it came to the TeamSpeak-side of the service, I had a minor error in reasoning, which I had to fix later on:
I was trying to implement a Bot, which could receive messages. This does not happen to work as long as you can not see the bot in the list of connected clients. The default setting is to hide bots connected via a Server Query connection to the servers.

This is a server-wide setting and wasn’t really useful for me. I was thinking of showing a security code on the website, which the TeamSpeak user would send to the bot afterwards, verifying the code and combine both sets of credentials.

Now, it works the other way round: The bot sends the code to the user and the user enters it on the website. Thus, I did not need to change any settings on the TeamSpeak server.

This was a prototype for a German YouTuber – rewinside – who makes regular videos in the series “Ultratalent”. There, he asks users on his TeamSpeak server to do their talent while he records it. Sometimes, the participants are really good, sometimes they are very bad. And rewinside does not hide his emotions for the competitors – kicking and banning are his two most favorited actions to do with unwanted or untalented guests.

That’s basically it for today. Another marriage between two APIs succeeded.