Hi friends! I recently played on a WvW Teamspeak that has an auto-verify feature that works with the GW2 API. This was Fort Aspenwood specifically, but I know Blackgate has something similar too.
I want to add this to the Teamspeak server that I run. Do any of you have any links to this resource and/or instructions on how to do it? Thanks for your time.
Comments
my guess would be they're using the mumble shared memory file to verify the players server and map:
https://wiki.guildwars2.com/wiki/API:MumbleLink
No Idea how to integrate that with something like teamspeak though; I've been using it with Qt C++ through a program I've made myself... that said if someone else has done it the tools must exist somewhere
Basically what you need to do is ask the player for an API key and use it to access their account endpoint: https://wiki.guildwars2.com/wiki/API:2/account
"world" gives you the id number of their server. You can see the ids for each server listed here: https://wiki.guildwars2.com/wiki/API:2/worlds
Yeah, this is done with the API. Here's the instructions on Fort Aspenwood:
http://www.fort-aspenwood.com/index.php?/topic/7420-teamspeak-autoverification/
I can't tell if this the proprietary work of a single developer, or if they've installed some sort of Teamspeak addon. Anyone have any insight?
Probably proprietary, but not sure. Multiple verification systems exists, but i have not tried any of them, so can't tell you how well they work.
A google search for "gw2 teamspeak verify bot github" revealed multiple projects you could try and use.
If you have any experience with developing software here is the gist of how you will do it for teamspeak
As others have mentioned, you need to get an API key from the user you want to verify
Once you have it, you can make a GET request at https://api.guildwars2.com/v2/account?access_token= which will provide you with various information about the player, including world ID (e.g. 2007 which is Far Shiverpeaks). To match a world id to a world, take a look at https://api.guildwars2.com/v2/worlds?ids=all
Once you know the user needs to have access on your teamspeak server, you need to put the user in the correct servergroup
This can be done via the teamspeak serverquiry api. I have used https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API for the Far Shiverpeaks ts bot, however you are free to use what ever wrapper you want for the language you use (assuming there is one available, just google for it).
Specifically for this wrapper, a servergroup can be given using api.addClientToServerGroup(serverGroupId, tsDatabaseId); where api is an instance of TS3Api. There is an example on the github page on how to obtain an instance of it.
Ever consider asking the Fort Aspenwood TS administrators about it?
This was written originally by an old Tarnished Coast TS admin iirc, from where we got it and then later passed it along to Sea of Sorrows TS admins.
https://github.com/metalfiiish/ts-gw2-verifyBot
Sorry for my bad english in advance
I wrote some code in python 2 for that to give my guild members ts3/forum(WBB4) groups based on the guild ranks using my guild leader api key to get the guildlist and ranks and compare them to the account endpoint of the client/user.
For the environment:
we running our forum and ts3 on our own vserver so we have full root access to everything.
i also moved the teamspeak to mysql instead of sqlite to simplyfy requests about groups ids and more stuff of the ts3 server. To be able to add clients to groups you will have to use the ts3 server querry which i implemented with a simple telnet connection on the localhost.
for the forum i use customized profile fields and a wbb4 add in for teamspeak sync to enter the apikey and the ts3 client uid my script runs in the background every 5 minutes to give users rights or take them away
for ts3 i use the ts3 serverbot https://www.stefan1200.de/forum/index.php?topic=2.0 giving me the oportunity to poke the user with a short url containing their client uid like http://theunbuffed.de/api/?TSUID=SNDbxuyJNYZrm0hZYivJoQtvpbs=
then is simply wrote a html form to enter the apikey and saving both in my database then my script is triggerd automaticly
Notes:
)
I dont care if i get errors for users are already in a group
i am new to python and gw2 api coding and but i work in it(not as programmer), with a little help of my it skilled guildmates it took us about 5 weeks to write this code and still strugling with some problems like to decide if api is down(like yesterday) or if the user has an deleted api key ( any help is welcome
the whole comments/documentation in the code is german and incomplete if you dont understand some parts ask me what im doing there (not remembering sometimes myself XD )
it runs somehow but its not optimized, a more skilled programmer can code this way better hope it helps anyway to find a solution for you
My Python Code:
My HTML Form:
My PHP Site behind the form
<!DOCTYPE html>
body {
background-image: url("Concept20.png");
background-size: 1920px 1080px;
}
If you want me to explain some parts or test it out you can write me ingame Akotun.1057 better mail then whisper since im mostly semi afk fixing this code these days hope it will help a bit to get an idea how you can do this
/edit: the beginning of the php is not formated as code don't know why maybe because of the html sorry for that