Skip to content
Edward edited this page Apr 16, 2021 · 3 revisions

That's simple:

AuthRequest request = MojangAuth.authenticate("[email protected]", "password"); // This will generate Client Token & return AuthRequest on success and APIException if there's an error.
AuthRequest request = MojangAuth.authenticate("[email protected]", "password", "clientToken");

request.getAccessToken(); // get access token
request.getClientToken(); // get client token
request.getProfile(); // get player profile (read Profile)

Analog: https://authserver.mojang.com/authenticate

Clone this wiki locally