To link your Minecraft account to your Discord account, you must first join our verification server on Minecraft. Connect to the following server in your Minecraft client:
Once ingame, you will be automatically provided with a link in the chat. Click the link to be taken to the Discord login page.
I was inspired to create ServrLink after seeing the large amount of resources linking Minecraft accounts to Discord accounts. I thought that in order to improve efficiency for both server owners and players,
a centralised service should be created so that authentication only has to happen once, ever.
Our technology stack consists of a NodeJS application called Registry that handles all requests. Underneath this, we use Redis to store verification keys, and MariaDB to store Minecraft UUIDs and Discord IDs permanently. In the future, we hope to create more Registry variants using different stacks, for example, a Golang application using MongoDB as the backend driver to make it more viable to host your own private Registry.
When a user joins the servr.link Minecraft server, a verification key is created and assigned to the player's UUID in the Redis cache, with an expiry of 10 minutes to prevent bruteforcing. The user is then provided with a link that points to our Registry server whereby the verification key is stored in a cookie, and the user is redirected to Discord to complete an oauth challenge. Our servers are then sent a temporary access token, which is used to retrieve the user's public Discord user ID, before being discarded. The Minecraft UUID is then retrieved from the Redis cache using the verification key stored in the cookie. Finally, the Minecraft UUID is stored with the Discord user ID in the MariaDB database.
The API is ratelimited to 600 requests per 10 minutes. It is unlikely that you will reach this limit, however, if you do, you are expected to implement some kind of local caching system. If you genuinely need more than
600 requests per 10 minutes, email us at firstname.lastname@example.org
However, if you're using the API through Minecraft, you can depend on the ServrLink plugin, which includes a wrapper for the API. If you are developing in Java, but not for Minecraft (for example, JDA), you could
take the API classes from the Minecraft plugin and add them to your program.
There is also a NodeJS wrapper available in the NPM repository.
You may be worried about the security of your data, however, there is no need to worry.
We have a robust and open-source system, which means that anyone can view the code and flag up issues or make improvements.
In addition to this, we handle very little of your data. Minecraft account verification is handled through joining the verification server, which means that your Mojang account credentials never come into contact with us. When you authenticate your Discord account, Discord handles all of the authentication, and only provides us with a temporary access token that is used to retrieve your public Discord user ID, and then is discarded. This means that we only store your Minecraft UUID and Discord user ID.