> For the complete documentation index, see [llms.txt](https://docs.api.epicbots.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.epicbots.xyz/coinsbot/users/recuperer-tous-les-utilisateurs-dun-serveur.md).

# Récupérer tous les utilisateurs d'un serveur

Récupère les utilisateurs d'un serveur, avec tri et pagination optionnels.

{% hint style="info" %}
Par défaut (**sans `limit`**), **tous** les utilisateurs sont renvoyés.
{% endhint %}

`GET` `/api/coinsbot/users/all`

***

### 🔧 Paramètres

| Paramètre | Requis |   Défaut   | Description                                                    |
| --------- | :----: | :--------: | -------------------------------------------------------------- |
| `GuildId` |    ✅   |      —     | ID du serveur                                                  |
| `apiKey`  |    ✅   |      —     | Clé API du serveur                                             |
| `limit`   |    ❌   | *(aucune)* | Nombre max de résultats. Absent = tout renvoyer. Max `100000`. |
| `offset`  |    ❌   |     `0`    | Décalage pour la pagination                                    |
| `sortBy`  |    ❌   |  *(aucun)* | Colonne de tri — voir ci-dessous                               |
| `order`   |    ❌   |    `asc`   | `asc` (croissant) ou `desc` (décroissant)                      |

#### 🔀 Valeurs de `sortBy`

`coins` · `bank` · `total` *(= coins + banque)* · `rep` · `livret` · `drugs` · `crypto` · `entrepot` · `xp` · `level` · `victoires` · `masterbalance` · `combowin` · `combolose`

{% hint style="info" %}
Le tri est **numérique**, même pour les colonnes stockées en texte en base.
{% endhint %}

***

### 💡 Exemples

**Tout le monde, trié par coins en main croissant :**

```http
GET /api/coinsbot/users/all?GuildId=123&apiKey=CLE&sortBy=coins&order=asc
```

**Les 25 plus riches (coins + banque), paginé :**

```http
GET /api/coinsbot/users/all?GuildId=123&apiKey=CLE&sortBy=total&order=desc&limit=25&offset=0
```

***

### ✅ Réponse `200`

Tableau d'objets utilisateur :

```json
[
  { "UserId": "111", "GuildId": "123", "Coins": 50, "Bank": 200, "Rep": 3 },
  { "UserId": "222", "GuildId": "123", "Coins": 120, "Bank": 0, "Rep": 1 }
]
```

***

### ❌ Erreurs

|  Code | Cause                                                          |
| :---: | -------------------------------------------------------------- |
| `400` | `GuildId` manquant, `sortBy`/`order`/`limit`/`offset` invalide |
| `401` | Clé API invalide                                               |
| `500` | Erreur interne                                                 |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.api.epicbots.xyz/coinsbot/users/recuperer-tous-les-utilisateurs-dun-serveur.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
