canonical: https://jentic.com/apis/mojang.com/mojang

# Mojang API

This Mojang API entry covers the same player-account and Minecraft session services as mojang.com/main and exposes 24 endpoints for UUID lookup, profile retrieval, skin and cape management, name-change history and availability, and session join verification. Use it for any tool that needs to resolve Minecraft usernames, fetch profiles, or verify multiplayer sign-in. Authenticated calls require a Minecraft access token obtained through the Microsoft and Xbox sign-in flow.

## For AI agents

Resolve Minecraft player UUIDs and profiles, manage skins and capes, check username availability, and verify session joins on multiplayer servers.

## Scope

Does not host game servers, manage Realms, expose the Minecraft Marketplace, or handle in-game chat - use for player identity, profile, skin, cape, and session verification only.

## Capabilities

- Resolve a Minecraft username to its current UUID
- Bulk resolve up to 10 usernames to UUIDs in one call
- Retrieve a player's profile, skin texture, and active cape
- Check whether a Minecraft username is available before claiming it
- Upload a new skin or activate a cape for the authenticated account
- Verify on a multiplayer server that a connecting client signed in via Mojang
- Read the authenticated player's blocked-server list and certificates

## Use cases

### Server-Side Online-Mode Authentication

Online-mode Minecraft servers verify that connecting clients have authenticated against Mojang's session servers before letting them join. The server passes the username and computed hash to GET `/session/minecraft/hasJoined`, which returns the signed profile if the client is genuine. Server plugin authors integrate this in a single afternoon.

Example prompt: Given a username and computed server hash, call GET `/session/minecraft/hasJoined` and confirm the response UUID matches the expected player

### Stat Tracker UUID Resolution

Stat-tracking sites and Discord bots resolve player names to UUIDs to persist records across name changes. GET `/users/profiles/minecraft/{playerName}` returns the UUID for a single name and POST `/profiles/minecraft` handles batches of up to 10. This is the standard pattern for any third-party Minecraft tool.

Example prompt: Resolve the username 'Notch' via GET `/users/profiles/minecraft/Notch` and return the UUID and profile flags

### Cape and Skin Management Tools

Third-party launchers and cosmetic tools let players manage their owned capes and uploaded skins outside the official client. POST `/minecraft/profile/skins` uploads a new skin, PUT `/minecraft/profile/capes/active` selects a cape, and DELETE removes the active asset. All player-scoped endpoints require a valid Minecraft access token.

Example prompt: Activate the player's owned Migrator cape via PUT `/minecraft/profile/capes/active` and confirm the response shows the new active cape

### Agent-Driven Community Verification via Jentic

Use a Jentic-connected agent to verify that Discord members claiming a Minecraft username actually own the account by looking up the canonical UUID. The agent searches Jentic for the lookup operation, loads the schema, and resolves usernames in bulk to drive automated role assignment.

Example prompt: For 25 Discord members claiming a Minecraft username, resolve each to a UUID and flag any that do not match the player's profile in the community database

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/users/profiles/minecraft/{playerName}` | Resolve a player name to a UUID |
| POST | `/profiles/minecraft` | Bulk resolve usernames to UUIDs |
| GET | `/session/minecraft/profile/{uuid}` | Get a player's profile by UUID |
| POST | `/minecraft/profile/skins` | Upload a new skin for the authenticated player |
| GET | `/minecraft/profile/name/{name}/available` | Check whether a username is available |
| GET | `/session/minecraft/hasJoined` | Verify a connecting client signed in to Mojang |

## Key resources

- **Players** — Resolve player names to UUIDs and the reverse
- **Profile Management** — Read and update profile, skin, and cape for the authenticated player
- **Authentication** — Exchange Xbox tokens for Minecraft access tokens
- **Server** — Verify session joins and read public keys and blocked-server lists

## Why Jentic

- **Setup:** Wiring the Mojang API by hand means managing a Minecraft bearer token, spreading calls across its API, session, and services hosts, and coding the profile and skin operations yourself. Through Jentic you install once, import the Mojang API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Mojang puts the player UUID and name in the URL path (`/session/minecraft/profile/{uuid}`, `/users/profiles/minecraft/{playerName}`), so a rule can pin your agent to one player identity for lookups. You choose the operations it may call, so a write like uploading a profile skin is not included unless you add it.
- **Credential handling:** Your Minecraft token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'check if a Minecraft username is available' or 'look up a player profile', and Jentic returns the matching Mojang operation with its schema so the agent calls the right endpoint without consulting community wikis.

## Related APIs

- **Mojang API** — The other Mojang API entry covering the same player and session endpoints.
- **Steam Web API** — Steam Web API verifies game ownership and friends lists for Steam-launched titles.
- **Discord API** — Discord API powers community bots that link Minecraft accounts to Discord identities.

## FAQ

### What authentication does the Mojang API use?

Public lookup endpoints such as GET `/users/profiles/minecraft/{playerName}` are unauthenticated. Player-scoped endpoints - profile, skin, cape, name change - require a Minecraft bearer access token obtained through Microsoft and Xbox Live sign-in ending at `/authentication/login_with_xbox.` Through Jentic the access token is held in the encrypted Jentic One instance.

### Can I check whether a Minecraft username is available?

Yes. GET `/minecraft/profile/name/{name}/available` returns whether the name is available, taken, or disallowed. The endpoint requires the authenticated player's bearer token because Mojang uses the call as part of the change-name flow rather than as a public lookup.

### What are the rate limits for the Mojang API?

The OpenAPI spec does not declare numeric rate limits. Mojang historically applied a soft limit of about 600 requests per 10 minutes per IP on public lookup endpoints, with stricter limits on the bulk UUID endpoint and any 429 responses indicating temporary blocks. Production tools should cache static lookups.

### How do I resolve a Minecraft username through Jentic?

Run pip install jentic, then search Jentic for 'resolve a Minecraft username to a UUID'. Jentic returns the GET `/users/profiles/minecraft/{playerName}` operation with its path schema. Load the schema, pass the username, and execute. The response includes the canonical UUID and any profile flags.

### Can my server use this API for online-mode authentication?

Yes. The GET `/session/minecraft/hasJoined` endpoint remains the canonical online-mode verification step. The connecting client first posts the server hash to Mojang's session server, and your server then calls hasJoined with the username and the same hash to retrieve a signed profile.

### How does this API entry differ from mojang.com/main?

Both entries point at the same underlying Mojang services - api.mojang.com and api.minecraftservices.com - and expose the same 24 endpoints. Either is suitable; pick whichever Jentic returns for your intent and stick with it for consistency in your tool's call history.

### Can I limit what my agent is allowed to do with the Mojang API?

Yes. Because you self-host Jentic One, your own rules decide which Mojang operations and credentials the agent may use. Since Mojang puts the player UUID and name in the URL path, such as `/session/minecraft/profile/{uuid}` and `/users/profiles/minecraft/{playerName}`, you can pin the agent to a single player identity for lookups. You also choose the operations it can call, so a write like uploading a profile skin via POST `/minecraft/profile/skins` is not available unless you explicitly add it.
