Difference between revisions of "Mojang API"
Jump to navigation
Jump to search
Thinkofdeath (talk | contribs) m |
Thinkofdeath (talk | contribs) m |
||
Line 2: | Line 2: | ||
== Notes == | == Notes == | ||
− | All public APIs are rate limited so you are expected to cache the results. This is currently set at | + | All public APIs are rate limited so you are expected to cache the results. This is currently set at 600 per 10 minutes but this may change |
== Username -> UUID == | == Username -> UUID == |
Revision as of 15:11, 17 July 2014
Contents
Notes
All public APIs are rate limited so you are expected to cache the results. This is currently set at 600 per 10 minutes but this may change
Username -> UUID
https://api.mojang.com/users/profiles/minecraft/<username>
This will turn the player's username and uuid
Response
{
"id": "7125ba8b1c864508b92bb5c042ccfe2b",
"name": "KrisJelbring"
}
Username -> UUID at time
https://api.mojang.com/users/profiles/minecraft/<username>?at=<timestamp>
This will turn the player's username and uuid at the timestamp provided
Response
{
"id": "7125ba8b1c864508b92bb5c042ccfe2b",
"name": "KrisJelbring"
}
UUID -> All current/previous names
https://api.mojang.com/user/profiles/<uuid>/names
Response
[
"KrisJelbring"
]
Player Information
https://sessionserver.mojang.com/session/minecraft/profile/<uuid>
This will return the player's username plus any additional information about them (e.g. skins). Example: https://sessionserver.mojang.com/session/minecraft/profile/4566e69fc90748ee8d71d7ba5aa00d20
Response
{
"id":"profile identifier",
"name":"player name",
"properties":[
{
"name":"dunno",
"value":"base64 string",
"signature":"base64 string; signed data using Yggdrasil's private key"
}
]
}
"value" base64 string decoded:
{
"timestamp":"some numbers",
"profileId":"profile identifier",
"profileName":"player name",
"isPublic":"true or false",
"textures":{
"SKIN":{
"url":"player skin URL"
}
"CAPE":{
"url":"player cape URL"
}
}
}
Players profiles by names
https://api.mojang.com/profiles/minecraft
Where 'minecraft' - agent name
This will return players profiles.
Payload
We need to send array of profiles nicknames. For example:
[
"maksimkurb",
"nonExistsPlayer" //Test for non-exists player
]
Response
[
{
"id": "0d252b7218b648bfb86c2ae476954d32", //Profile uuid
"name": "maksimkurb", //Profile nickname
"legacy": true, //Profile not migrated to mojang.com? (Only appears, when true)
"demo": true //Game wasn't bought (Only appears, when true)
}
// How we can see, this url return only information about real (exists) profiles.
]