mojira.dev
WEB-3613

API returning inaccurate data

The API endpoint: https://api.mojang.com/profiles/minecraft

Isn't returning a 'legacy' boolean, even though it used to, and it isn't even for accounts that ARE still legacy.

Example: https://namemc.com/profile/AntiNotch.1 This account is unmigrated, but when a request is sent to the endpoint (payload):

["AntiNotch"]

the data returned is 

[{"id":"4f26516ef0044663a38ad2aa4682122c","name":"AntiNotch"}]

This is incorrect in accordance with the wiki: https://wiki.vg/Mojang_API#Playernames_-.3E_UUIDs

The correct response would have been:

[{"id":"4f26516ef0044663a38ad2aa4682122c","name":"AntiNotch","legacy":true}]

Edit: This incorrect behaviour is also visible here: https://api.mojang.com/users/profiles/minecraft/AntiNotch

Comments 1

The "legacy" attribute is an optional parameter in this API. As part of supporting new types of accounts, this boolean attribute will no longer be returned for legacy users, so it is a change in behaviour on our end. The API-format is however still intact, since this attribute is optional. 

To check if an account is legacy, please use: 

GET https://sessionserver.mojang.com/session/minecraft/profile/<uuid>

All the best, 
MA

 

L. Gandon

web

Retrieved