Game Startup
All this info is accurate as of MCEDU v1.21.10. Also
Early Start
- Sends a get request to
https://client.discovery.minecraft-services.net/api/v1.0/discovery/MinecraftEdu/builds/1.21.10for any new updates to the API links & the PlayFab TitleID, which is 6955F. - Sends a post request to
https://login.minecrafteduservices.com/initialPacks. Sometimes it tells you to download stuff, othertimes it doesn't. If you're building a program for MCEDU, you can safely ignore this part. This request wants a correlation vector, which should be the same for all requests in a session. It's just a UUIDv4.
Click to view request/response structure
| Request Body | Response |
|---|---|
|
|
Playfab API
- It sends a post request to
https://6955f.playfabapi.com/Client/LoginWithCustomID. The most important thing for auth is the custom ID. If you don't have one, make one up. All the examples I've seen start with MCPF then have a random mix of 32 numbers and capital letters. If it's your first time using a customID, set createAccount to true.
Click to view request/response structure
| Request | Response |
|---|---|
|
|
- It sends a post request to
https://6955f.playfabapi.com/Authentication/GetEntityToken. This returns an entity token, which can be decoded from base64 to see the data it contains. It is never used from my testing however.
Click to view request/response structure
| Request | Response |
|---|---|
|
|
- It sends a post request to
https://6955f.playfabapi.com/Client/GetUserPublisherData
Click to view request/response structure
| Request | Response |
|---|---|
Headers:Body: |
Body:
|
- Then it sends two unimportant Client/WritePlayerEvent post messages, basically telling them your hardware info & that you started up the game. Probably for Playfab statistics.
Minecraft Auth
- Now it gets the more important tokens. It sends a post request to
https://authorization.franchise.minecraft-services.net/api/v1.0/session/start. The UserAgent must be set to libhttpclient/1.0.0.0, or the request will fail. You also need a deviceID, which is another 32 character string of random numbers & letters, all lowercase. I recommend using the same one, even with different sessions. This gives you the MCToken, very important. As far as I can tell, memory is always 2 gibibytes in bytes.
Click to view request/response structure
| Request | Response |
|---|---|
Headers:Body: |
Body:
|
-
You need to get another token! This one is slightly important for some things. It sends a post request to
https://login.minecrafteduservices.com/v2/signin. User agent must be libhttpclient/1.0.0.0. You need a microsoft access token in order to send requests to this endpoint. Here's the steps. Thanks to bundabrg to making them. -
Create a OAuth2 authorization link with client ID
b36b1432-1a1c-4c82-9b76-24de1cab42f2, the auth URL should behttps://login.microsoftonline.com/common/oauth2/authorize, the redirect URI should behttps://login.microsoftonline.com/common/oauth2/nativeclient, and the resource should behttps://meeservices.minecraft.net. -
Open that link and sign in with a valid account. You will be redirected to a blank page that starts with
https://login.microsoftonline.com/common/oauth2/nativeclient. Copy paste everything, because that link is your authorization response. -
Fetch an OAuth2 token using the link
https://login.microsoftonline.com/common/oauth2/token, the authorization response, & make sure that includeClientID==True. This will return some JSON. Something along the lines of token['accessToken'] and you have the access token.
Alternatively, use the Web Account Manager and MSAL Broker to emulate the actual process MCEDU goes through.
Click to view request/response structure
| Request | Response |
|---|---|
Headers:Body: |
Body:
|
And that's the end of startup!