> For the complete documentation index, see [llms.txt](https://neppy.antonio32a.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neppy.antonio32a.com/api-documentation/fragbots.md).

# Fragbots

## Get Fragbots

<mark style="color:blue;">`GET`</mark> `https://fragbots.antonio32a.com/`

This endpoint returns all online fragbots and their queues.

{% tabs %}
{% tab title="200 Fragbots successfully retrieved." %}

```javascript
[
    {
        "username": "frag1",
        "guildId": "something",
        "queue": [ 
            "user1", 
            "user2"
        ]
    },
    {
        "username": "frag2",
        "guildId": "something",
        "queue": [ 
            "user3", 
            "user5", 
            "user5" 
        ]
    }
]
```

{% endtab %}
{% endtabs %}

## Get Whitelist

<mark style="color:blue;">`GET`</mark> `https://fragbots.antonio32a.com/whitelist`

This endpoint returns all trimmed Minecraft UUIDs of all people who are whitelisted.

{% tabs %}
{% tab title="200 Whitelist successfully retrieved." %}

```javascript
[
    "6c0254d81d9041bdb75fdca14935fd3e",
    "689ff4bbf61e4e0594e01066892b0bbe"
]
```

{% endtab %}
{% endtabs %}

## Get User

<mark style="color:blue;">`GET`</mark> `https://fragbots.antonio32a.com/user`

This endpoint returns your user data.

#### Path Parameters

| Name  | Type   | Description                |
| ----- | ------ | -------------------------- |
| token | string | Your authentication token. |

{% tabs %}
{% tab title="200 User data successfully retreived." %}

```javascript
{
    "success": true,
    "invites": 32,
    "uuid": "6c0254d81d9041bdb75fdca14935fd3e",
    "discord": "166630166825664512"
}
```

{% endtab %}

{% tab title="400 You didn't provide all of the request parameters." %}

```javascript
{
    "success": false
}
```

{% endtab %}

{% tab title="403 Invalid token." %}

```javascript
{
    "success": false,
    "error": "Invalid token."
}
```

{% endtab %}
{% endtabs %}

## Authentication

Authenticating allows you to get a `token` which is used for some of the requests listed above.

## 1. Send Mojang the hash

<mark style="color:green;">`POST`</mark> `https://sessionserver.mojang.com/session/minecraft/join`

This endpoint tells Mojang that you're joining a server, but in our case it's used to confirm the hash.

#### Request Body

| Name            | Type   | Description                                  |
| --------------- | ------ | -------------------------------------------- |
| accessToken     | string | Your Minecraft access token, AKA session ID. |
| selectedProfile | string | Your Minecraft UUID.                         |
| serverId        | string | Randomly generated Minecraft hex digest.     |

{% tabs %}
{% tab title="200 Request was successful, no content." %}

```
```

{% endtab %}
{% endtabs %}

## 2. Send neppy backend the hash

<mark style="color:green;">`POST`</mark> `https://fragbots.antonio32a.com/authenticate`

This endpoint tells neppy backend your username and your hash so it can be verified. This must be sent after the first request.

#### Path Parameters

| Name     | Type   | Description                                                        |
| -------- | ------ | ------------------------------------------------------------------ |
| hash     | string | Randomly generated Minecraft hex digest from the previous request. |
| username | string | Your Minecraft username-                                           |

{% tabs %}
{% tab title="200 Authentication was successful." %}

```javascript
{
    "success": true,
    "token": "tX2NfdAOIcM19I3PfAtjYDuto8HdAow0d4zQLSM32iMD5H1GIeYY47nktr46NXP",
    "expiresAt": 1616853123922
}
```

{% endtab %}

{% tab title="400 Your didn't provide all of the request parameters" %}

```javascript
{
    "success": false
}
```

{% endtab %}

{% tab title="403 The hashes didn't match." %}

```javascript
{
    "success": false
}
```

{% endtab %}
{% endtabs %}

## 3. Renew the token every 4 hours

<mark style="color:green;">`POST`</mark> `https://fragbots.antonio32a.com/renew`

This endpoint will renew your session.

#### Path Parameters

| Name  | Type   | Description                   |
| ----- | ------ | ----------------------------- |
| token | string | The token obtained in step 2. |

{% tabs %}
{% tab title="200 Token was successfully renewed." %}

```javascript
{
    "success": true,
    "expiresAt": 1616853123922
}
```

{% endtab %}

{% tab title="400 You didn't provide all of the request parameters." %}

```javascript
{
    "success": false
}
```

{% endtab %}

{% tab title="403 Invalid token." %}

```javascript
{
    "success": false,
    "error": "Invalid token."
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://neppy.antonio32a.com/api-documentation/fragbots.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
