# Mojang

> Look up Minecraft players and public game data through Mojang's official public API: resolve usernames to UUIDs (and back), bulk-resolve up to 10 usernames at once, fetch a player's profile with skin and cape textures, list Mojang's blocked servers, and read Mojang's signing public keys. No account or API key required.

App · Gaming · 7 actions. Web page: https://docs.lodol.com/docs/integrations/mojang

## Actions

### Get blocked servers

Get Mojang's list of blocked server hashes. Each entry is the SHA-1 hash of a blocked server hostname.

**Inputs**: None.

**Outputs**

- `count` (number)
- `hashes` (list)

**Example output**

```json
{
  "count": 2,
  "hashes": [
    "dc2c735b3e6aba51ece294d7de21b947379aac4d",
    "780874bcade721dfccdf2ccd51cec3eb3a35c958"
  ]
}
```

### Get player profile

Get a player's profile by UUID, including the base64-encoded textures property (skin and cape). Optionally include Mojang's signature over the textures data.

**Inputs**

- UUID (`uuid`, text, required): The player's Minecraft UUID, for example 853c80ef3c3749fdaa49938b674adae6. Look one up with 'Get UUID by username'.
- Include signature (`include_signature`, true/false): Also return Mojang's signature over the textures data. Leave off unless you need to verify the data's authenticity. Default: `false`.

**Outputs**

- `profile` (object)

**Example output**

```json
{
  "profile": {
    "id": "853c80ef3c3749fdaa49938b674adae6",
    "name": "jeb_",
    "profileActions": [],
    "properties": [
      {
        "name": "textures",
        "value": "eyJ0aW1lc3RhbXAiOjE3ODY2Njk3MDE3MjIsInByb2ZpbGVJZCI6Ijg1M2M4MGVmM2MzNzQ5ZmRhYTQ5OTM4YjY3NGFkYWU2IiwicHJvZmlsZU5hbWUiOiJqZWJfIiwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzdmZDliYTQyYTdjODFlZWVhMjJmMTUyNDI3MWFlODVhOGUwNDVjZTBhZjVhNmFlMTZjNjQwNmFlOTE3ZTY4YjUifSwiQ0FQRSI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzllNTA3YWZjNTYzNTk5NzhhM2ViM2UzMjM2NzA0MmI4NTNjZGRkMDk5NWQxN2QwZGE5OTU2NjI5MTNmYjAwZjcifX19"
      }
    ]
  }
}
```

### Get player skin & cape

Get a player's skin and cape as ready-to-use image URLs, decoded from their profile: the skin URL and model (classic or slim), and the cape URL if they have one.

**Inputs**

- UUID (`uuid`, text, required): The player's Minecraft UUID, for example 853c80ef3c3749fdaa49938b674adae6. Look one up with 'Get UUID by username'.

**Outputs**

- `textures` (object)

**Example output**

```json
{
  "textures": {
    "cape_url": "http://textures.minecraft.net/texture/9e507afc56359978a3eb3e32367042b853cddd0995d17d0da995662913fb00f7",
    "name": "jeb_",
    "skin_model": "classic",
    "skin_url": "http://textures.minecraft.net/texture/7fd9ba42a7c81eeea22f1524271ae85a8e045ce0af5a6ae16c6406ae917e68b5",
    "uuid": "853c80ef3c3749fdaa49938b674adae6"
  }
}
```

### Get public keys

Get Mojang's public keys, used to verify signed profile properties, player chat certificates, and authentication data.

**Inputs**: None.

**Outputs**

- `publicKeys` (object)

**Example output**

```json
{
  "publicKeys": {
    "authenticationKeys": [
      {
        "publicKey": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAg..."
      }
    ],
    "playerCertificateKeys": [
      {
        "publicKey": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAg..."
      }
    ],
    "profilePropertyKeys": [
      {
        "publicKey": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAg..."
      }
    ]
  }
}
```

### Get username by UUID

Look up a Minecraft player's current username from their UUID (dashed or undashed).

**Inputs**

- UUID (`uuid`, text, required): The player's Minecraft UUID, for example 853c80ef3c3749fdaa49938b674adae6. Dashed or undashed are both accepted.

**Outputs**

- `player` (object)

**Example output**

```json
{
  "player": {
    "id": "853c80ef3c3749fdaa49938b674adae6",
    "name": "jeb_"
  }
}
```

### Get UUID by username

Look up a Minecraft player's UUID (and canonical name casing) from their username.

**Inputs**

- Username (`username`, text, required): The player's Minecraft username, for example jeb_. Case-insensitive; the response returns the canonical casing.

**Outputs**

- `player` (object)

**Example output**

```json
{
  "player": {
    "id": "853c80ef3c3749fdaa49938b674adae6",
    "name": "jeb_"
  }
}
```

### Get UUIDs by usernames (bulk)

Resolve up to 10 Minecraft usernames to their UUIDs in one request. Usernames that don't exist are omitted from the result.

**Inputs**

- Usernames (`usernames`, list, required): The Minecraft usernames to resolve (up to 10 per request).

**Outputs**

- `players` (list)

**Example output**

```json
{
  "players": [
    {
      "id": "853c80ef3c3749fdaa49938b674adae6",
      "name": "jeb_"
    },
    {
      "id": "069a79f444e94726a5befca90e38aaf5",
      "name": "Notch"
    },
    {
      "id": "61699b2ed3274a019f1e0ea8c3f06bc6",
      "name": "Dinnerbone"
    }
  ]
}
```
