---
title: List API Tokens
description: "Lists all personal access tokens belonging to the current user. Requires the * scope."
url: "https://betterdocs.shahrear.msf.bd/index.php/docs/hell0-boys-docs/hell0-boys/user/list-api-tokens/"
updated: "2026-08-20"
category: hell0 boys / User
---

# List API Tokens

GET`/user/tokens`

## Code Samples

```curl

                curl --request GET \
  --url 'https://app.xcloud.host/api/v1/user/tokens' \
  --header 'Authorization: Bearer YOUR_TOKEN'

                const response = await fetch('https://app.xcloud.host/api/v1/user/tokens', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
});

const data = await response.json();
console.log(data);

                import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN"
}

response = requests.get("https://app.xcloud.host/api/v1/user/tokens", headers=headers)

print(response.json())

                <?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://app.xcloud.host/api/v1/user/tokens',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
  'Authorization: Bearer YOUR_TOKEN'
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

                using System.Net.Http;

var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://app.xcloud.host/api/v1/user/tokens");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);

                import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.xcloud.host/api/v1/user/tokens"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Response

```json

                {
    "success": true,
    "message": "Tokens retrieved successfully.",
    "data": [
        {
            "uuid": "8c1f3a89-2c4e-4a73-9d4c-8b1f2a3d4e5f",
            "name": "My CI Token",
            "abilities": [
                "read:servers",
                "read:sites"
            ],
            "team_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "team_name": "Acme",
            "last_used_at": "2025-03-10T08:22:00Z",
            "created_at": "2025-01-20T14:00:00Z"
        }
    ]
}

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}
```

Lists all personal access tokens belonging to the current user. Requires the `*` scope.

## Responses

### 200 — List of [API](https://betterdocs.shahrear.msf.bd/encyclopedia/api/) tokens

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |
| `data` | array of object | Optional |  |

```json

                {
    "success": true,
    "message": "Tokens retrieved successfully.",
    "data": [
        {
            "uuid": "8c1f3a89-2c4e-4a73-9d4c-8b1f2a3d4e5f",
            "name": "My CI Token",
            "abilities": [
                "read:servers",
                "read:sites"
            ],
            "team_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "team_name": "Acme",
            "last_used_at": "2025-03-10T08:22:00Z",
            "created_at": "2025-01-20T14:00:00Z"
        }
    ]
}
```

### 401 — Missing or invalid authentication token

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}
```

### 403 — Token lacks the required scope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}
```
