MinecraftServicesApi

Endpoints on api.minecraftservices.com. Most of them require an Authorization: Bearer <token> header.

The authentication endpoints of this host (login_with_xbox, entitlements/license, player/certificates) are deliberately absent - MinecraftAuth already implements them as MinecraftLauncherLoginRequest, MinecraftEntitlementsRequest and MinecraftPlayerCertificatesRequest, driven by JavaAuthManager.

Functions

Link copied to clipboard
@PUT(value = "minecraft/profile/name/{name}")
abstract suspend fun changeName(@Path(value = "name") newName: String): PlayerProfile
Link copied to clipboard
@POST(value = "minecraft/profile/skins")
abstract suspend fun changeSkin(@Body request: ChangeSkinRequest): PlayerProfile
Link copied to clipboard
@GET(value = "productvoucher/giftcode")
abstract suspend fun checkGiftCode(): Response<Unit>
Link copied to clipboard
@GET(value = "minecraft/profile/name/{name}/available")
abstract suspend fun checkNameAvailability(@Path(value = "name") name: String): NameAvailability
Link copied to clipboard
@GET(value = "player/attributes")
abstract suspend fun fetchAttributes(): PlayerAttributes
Link copied to clipboard
@GET(value = "minecraft/profile")
abstract suspend fun fetchProfile(): PlayerProfile
Link copied to clipboard
@GET(value = "privacy/blocklist")
abstract suspend fun getBlockList(): BlockList
Link copied to clipboard
@GET(value = "friends")
abstract suspend fun getFriends(@Header(value = "If-None-Match") etag: String? = null): Response<FriendsList>
Link copied to clipboard
@GET(value = "minecraft/profile/namechange")
abstract suspend fun getNameChangeInfo(): NameChangeInfo
Link copied to clipboard
@GET(value = "publickeys")
abstract suspend fun getPublicKeys(): PublicKeys
Link copied to clipboard
@DELETE(value = "minecraft/profile/capes/active")
abstract suspend fun hideCape(): PlayerProfile
Link copied to clipboard
@GET(value = "minecraft/profile/lookup/{uuid}")
abstract suspend fun lookupNameByUuid(@Path(value = "uuid") uuid: String): ProfileIdName
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
Link copied to clipboard
@POST(value = "presence")
abstract suspend fun reportPresence(@Body request: PresenceRequest): PresenceResponse
Link copied to clipboard
@DELETE(value = "minecraft/profile/skins/active")
abstract suspend fun resetSkin(): PlayerProfile
Link copied to clipboard
@PUT(value = "minecraft/profile/capes/active")
abstract suspend fun showCape(@Body request: ActivateCapeRequest): PlayerProfile
Link copied to clipboard
@POST(value = "player/attributes")
abstract suspend fun updateAttributes(@Body update: PlayerAttributesUpdate): PlayerAttributes
Link copied to clipboard
@PUT(value = "friends")
abstract suspend fun updateFriend(@Body request: FriendsUpdateRequest): Response<FriendsList>
Link copied to clipboard
@Multipart
@POST(value = "minecraft/profile/skins")
abstract suspend fun uploadSkin(@Part(value = "variant") variant: RequestBody, @Part file: MultipartBody.Part): PlayerProfile