> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mintsys.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

## How to authenticate with Mint API

All Mint API endpoints mandate authentication via Bearer tokens, providing secure access for sensitive actions such as account mapping and database management.

## Obtaining a Key

1. Apply for a API Key by opening a **Developer Support** Ticket inside of the Mint Systems Discord Server.
2. Use API Key as your Berear Token for Authentication

<Warning>
  Ensure to keep your API Key secure. Do not leave it out inside client-side code or public Github Repositories
</Warning>

## Key Types

We offer two types of API Keys that you can apply for.

1. **Guild-Only Key** – This key has no request limits and a 2-second rate limit. However, it can only be used in the server where it was registered.
2. **Global Key** – This key has no request limits and a 1-second rate limit. It can be used in any server.

## Using the API Key

Ensure to include the **API Key** inside of the Authorization header of your request. Examples can be found below.

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -H "x-api-key: YOUR_API_KEY" \
  -H "x-guild-id: 987654321" \
  "https://api.mintsys.xyz/v1/api/public/discord-to-roblox?discordId=123456789"
  ```

  ```javascript JavaScript (Fetch) theme={null}
  fetch("https://api.mintsys.xyz/v1/api/public/discord-to-roblox?discordId=123456789", {
    headers: {
      "x-api-key": "YOUR_KEY",
      "x-guild-id": "987654321", 
    },
  })
    .then(res => res.json())
    .then(data => console.log(data))
    .catch(err => console.error(err));
  ```

  ```python Python (Requests) theme={null}
  import requests

  headers = {
      "x-api-key": "YOUR_KEY",
      "x-guild-id": "987654321",
  }

  params = {"discordId": "123456789"}

  response = requests.get(
      "https://api.mintsys.xyz/v1/api/public/discord-to-roblox",
      headers=headers,
      params=params
  )

  print(response.json())
  ```
</CodeGroup>

## Error Handling

If your authentication to the API fails, you will receive a **401 Unauthorized** response from the API. Example below:

```javascript theme={null}
{
  "status": 401,
  "error": "Unauthorized: Invalid API key",
  "timestamp": "2026-02-12T12:00:00Z",
  "version": "1.2.1"
}
```

***

<Note>
  We provide a ready-to-use **public utility file** that makes integrating the Mint API effortless. With this file, you can quickly fetch Roblox and Discord information.
</Note>

[https://github.com/mintrblx/utils](https://github.com/mintrblx/utils)
