MCBE
OverviewPacketsLogin
ID 0x01 · 1Client → ServerConnection

Login

Carries the player's identity: an Xbox-authenticated JWT chain (or a PlayFab multiplayer token on 1.26.x clients) plus a client-data JWT with skin, device and locale claims.

login.bin
connection request:
  int32 LE  <chain JSON length>
  ...       {"Certificate":"{\"chain\":[...]}", "AuthenticationType":2, "Token":"eyJ..."}
            -- or legacy: {"chain":["<jwt>","<jwt>","<jwt>"]}
  int32 LE  <client data JWT length>
  ...       client data JWT (header.payload.signature)

Structure

FieldTypeDescription
Protocol Versionint32 (BE)Client protocol number — 2193.
Connection Requestbyte[]varuint32-length-prefixed blob, laid out below.

Structure of Connection Request

Wire layout of the varuint32-length-prefixed blob inside the Login packet (gophertunnel protocol/login/request.go).

FieldTypeDescription
Chain Lengthint32 (LE)Byte length of the identity-chain JSON that follows.
Chain JSONstringEither the 1.26.x envelope {Certificate, AuthenticationType, Token} or the legacy {chain:[...]} — see notes.
Client Data Lengthint32 (LE)Byte length of the client-data JWT.
Client DataJWTRaw client-data JWT (header.payload.signature), signed with the client identity key (cpk).

Structure of Identity Chain (legacy)

The legacy {"chain":[...]} JSON — exactly 1 or 3 ES384 JWTs. A single token means a self-signed (offline) client; three tokens mean an Xbox Live-authenticated client.

FieldTypeDescription
Token 0 — identityJWTSelf-signed. Header x5u carries the client's ECDSA P-384 public key; payload has extraData, identityPublicKey and certificateAuthority. Validated with its own x5u key.
Token 1 — MojangJWTIssuer "Mojang". Signed by Mojang's hardcoded ECDSA P-384 root key — this is what proves Xbox Live authentication. Its identityPublicKey claim is the key that validates token 2.
Token 2 — clientJWTIssuer "Mojang". Payload: extraData + identityPublicKey. Validated with token 1's identityPublicKey.
extraData.XUIDstring (int64)Xbox Live user id; must parse as int64.
extraData.identitystring (uuid)Player UUID. Servers derive it from the XUID (MD5 v3 over "pocket-auth-1-xuid:<xuid>").
extraData.displayNamestringGamertag shown in-game.
extraData.titleIdstringPlatform title id, e.g. 896928775 Win32, 1739947436 mobile, 2047319603 Nintendo.

Structure of Multiplayer Token (OIDC) claims

Payload claims of the Token JWT in the 1.26.x envelope — JSON, not a wire encoding. Servers verify it as an OIDC id token against Minecraft's authorization service JWKS.

FieldTypeDescription
iptstringIdentity provider type — always "PlayFab".
midstringPlayFab master account id (MCID/PFID).
tidstringPlayFab title id — 20CA2 for retail.
cpkbase64 stringClient public key (base64 SPKI DER): used for ECDH and to sign the client-data JWT. Pre-1.26.40 clients send a base64 DER string, 26.40+ a JWK object.
xidstringXbox Live user id (XUID). Non-empty xid marks the session as Xbox-authenticated.
xnamestringDisplay name (gamertag).
leguuidstring (uuid)Offline UUID fallback.
audstringAudience api://auth-minecraft-services/multiplayer.

Structure of Client Data JWT claims

Selected payload claims of the client-data JWT (gophertunnel protocol/login Data struct). Signed with the cpk key.

FieldTypeDescription
ClientRandomIdint64Random per-login nonce.
ServerAddressstringAddress the client dialed. NetherNet joins look like https://host:port:port.
DeviceOSint enum1 Android … 7 Windows(Store), 8 Win32, 11 Orbis, 12 NX, 13 Xbox. Servers validate 1–15.
DeviceId / DeviceModelstringPer-OS device identifiers; format is validated per platform.
GameVersionstringClient game version string.
LanguageCodestringLocale, e.g. en_US.
SkinDatabase64RGBA skin pixels, 64×32, 64×64 or 128×128 (byte length is validated).
SkinGeometryDatastring (JSON)Skin geometry JSON (+ SkinGeometryDataEngineVersion).
SkinId / SkinImageHeight / SkinImageWidthstring / intSkin metadata.
CapeData / CapeId / CapeImageHeight / CapeImageWidthbase64 / string / intCape pixels and metadata.
PremiumSkin / PersonaSkin / TrustedSkin / OverrideSkinboolSkin provenance flags.
SkinResourcePatch / SkinColor / ArmSizestringPersona configuration.
SkinAnimationData / AnimatedImageData / PersonaPieces / PieceTintColorsJSONPersona animations and pieces.
SelfSignedId / PlatformOfflineId / PlatformOnlineId / PlatformUserIdstringPlatform identity ids.
CurrentInputMode / DefaultInputMode / UIProfile / GuiScaleintInput and UI configuration.
ThirdPartyName / ThirdPartyNameOnlystringUntrusted client-provided name; prefer extraData.displayName.
CompatibleWithClientSideChunkGenboolClient can generate chunks client-side.
MaxViewDistanceintClient max render distance.
MemoryTier / PlatformType / GraphicsModeintHardware capabilities.
PlayFabIdstring (hex)PlayFab entity id; validated as hex.
PartyId / IsPartyLeaderstring / boolParty state.
NoncestringLAN games must echo the random nonce from discovery ServerData — missing/unknown/expired nonces are rejected.
FilterProfanityboolClient wants profanity filtering.
ClientEditorConnectionIntent / ClientIsEditorCapableint / boolEditor-mode intent.

Notes

  • First compressed, still unencrypted packet of the session.
  • The connection request is varuint32-length-prefixed; its inner lengths are int32 little-endian.
  • New 1.26.x envelope: {"Certificate": "<chain JSON>", "AuthenticationType": 1|2, "Token": "<multiplayer JWT>"}. AuthenticationType 2 (self-signed) is rejected by servers that require Xbox Live auth.
  • Legacy envelope: {"chain": [identity, mojang, client]} — token 0 self-signed, token 1 signed by Mojang's ECDSA P-384 root key, token 2 carries extraData (XUID, identity UUID, displayName, titleId).
  • The Token JWT is the OIDC multiplayer token issued by Minecraft's authorization service: claims ipt=PlayFab, mid (PlayFab id), tid (title, 20CA2 retail), cpk (client public key), xid (XUID), xname (gamertag). Servers verify it against the service's JWKS.
  • Player UUID is derived from the XUID as an MD5 name-based (v3) UUID over "pocket-auth-1-xuid:<xuid>".
  • The client-data JWT is signed with the cpk key and carries ClientRandomId, DeviceOS, DeviceId, LanguageCode, SkinData (base64 RGBA), SkinGeometryData, CapeData, PlayFabId, Nonce (LAN games must echo the nonce from discovery) and more.