API Methods#
get_uuid(username, timestamp=None)
#
Convert a Minecraft name to a UUID.
Limited Functionality
As of November 2020, Mojang stopped supporting the timestamp parameter, which allowed users to get UUID of the name at the timestamp provided. If a timestamp is provided, it is silently ignored and the current UUID is returned. Please remind them to fix this here: WEB-3367.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The Minecraft username to be converted. |
required |
timestamp |
optional
|
Get the username's UUID at a specified UNIX timestamp.
You can also get the username's first UUID by passing |
None
|
Returns:
Type | Description |
---|---|
Optional[str]
|
The UUID ( |
get_uuids(names)
#
Convert up to 10 usernames to UUIDs in a single network request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
List[str]
|
The Minecraft username(s) to be converted. If more than 10 are included, only the first 10 will be parsed. |
required |
Returns:
Type | Description |
---|---|
Dict[str, str]
|
A dictionary object that contains the converted usernames. Names are also case-corrected. |
Dict[str, str]
|
If a username does not exist, it will not be included in the returned dictionary. |
get_username(uuid)
#
Convert a UUID to a username.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
uuid |
str
|
The Minecraft UUID to be converted to a username. |
required |
Returns:
Type | Description |
---|---|
Optional[str]
|
The username. |
get_profile(uuid)
#
Get more information about a user from their UUID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
uuid |
str
|
The Minecraft UUID |
required |
Returns:
Type | Description |
---|---|
Optional[UserProfile]
|
|
get_blocked_servers()
#
Get a list of SHA1 hashes of blacklisted Minecraft servers that do not follow EULA. These servers have to abide by the EULA or they will be shut down forever. The hashes are not cracked.
Returns:
Type | Description |
---|---|
List[str]
|
Blacklisted server hashes |
refresh_access_token(access_token, client_token)
#
Refreshes access token
Parameters:
Name | Type | Description | Default |
---|---|---|---|
access_token |
str
|
The access token to refresh. |
required |
client_token |
str
|
The client token that was used to obtain the access token. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary object that contains the new access token and other account and profile information |