You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edward edited this page Apr 16, 2021
·
3 revisions
That's simple:
AuthRequestrequest = MojangAuth.authenticate("example@example.com", "password"); // This will generate Client Token & return AuthRequest on success and APIException if there's an error.AuthRequestrequest = MojangAuth.authenticate("example@example.com", "password", "clientToken");
request.getAccessToken(); // get access tokenrequest.getClientToken(); // get client tokenrequest.getProfile(); // get player profile (read Profile)