MojangApi

interface MojangApi

Endpoints on api.mojang.com.

Functions

Link copied to clipboard
@POST(value = "profiles/minecraft")
abstract suspend fun fetchProfiles(@Body names: List<String>): List<ProfileIdName>

Max 10 names. Missing ones are omitted from the response.

Link copied to clipboard
@GET(value = "users/profiles/minecraft/{username}")
abstract suspend fun fetchUuidByUsername(@Path(value = "username") username: String): ProfileIdName

Returns 404 if no player exists.

Link copied to clipboard
@POST(value = "minecraft/profile/lookup/bulk/byname")
abstract suspend fun lookupProfilesBulk(@Body names: List<String>): List<ProfileIdName>
Link copied to clipboard
@GET(value = "minecraft/profile/lookup/name/{username}")
abstract suspend fun lookupUuidByName(@Path(value = "username") username: String): ProfileIdName