# Server-API: guest links

Quelle: https://docs.neode.sk/de/development/api-reference/server-guest-links/
Zuletzt geändert: 2026-12-03

> 5 Operationen. Guest links on the server API: making, listing and revoking them, and the routes the guest page asks with the link's token.

Diese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in `X-API-Key` oder ein Anmelde-Token; siehe [Die HTTP-API](https://docs.neode.sk/de/development/api.md#signing-in). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Guest links on the server API: making, listing and revoking them, and the routes the guest page asks with the link's token.

## GET /api/guest/access-links

List the guest links that are still good.

Lists the links that are neither expired nor revoked. Admins, super admins and global admins see every link, other callers the links they made.

On the server API, port 21114. Needs `guest.create`.

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `grants` | array of [GuestLink](https://docs.neode.sk/de/development/api-reference/schemas.md#guestlink) | yes |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |

## POST /api/guest/access-links

Make a guest link that lets someone connect to devices for a while.

Every device must be in the caller's organization and scope. The answer holds the link's token once.

On the server API, port 21114. Needs `guest.create`.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `peer_ids` | array of string | yes | The devices the link opens, by ID: 3 to 64 letters, digits, _ and -. Repeats are dropped. |
| `ttl_minutes` | integer |  | Minutes the link works; left out or below 1 is 60, more than 1440 is 1440; default `60`, at least 1 |
| `view_only` | boolean |  | The guest may only watch. Only for mesh and CDAP devices: a RustDesk device cannot be kept to watching.; default `false` |
| `label` | string |  | A name for the link |
| `max_uses` | integer |  | How many sessions the link may open; 0 for no limit; default `0`, at least 0 |

**201**: Created (`application/json`)

[GuestLinkCreated](https://docs.neode.sk/de/development/api-reference/schemas.md#guestlinkcreated).

| Error | When |
|---|---|
| 400 | The body is no JSON, a device ID is not valid, there is no device, or view_only for a RustDesk device |
| 401 | No credential, or one that is not valid |
| 403 | The role lacks the permission, or a device is outside the caller's organization or scope |

## GET /api/guest/access-links/peers

List the devices a guest link opens.

Needs no sign-in: the token is the credential. Gives each device's name, system and whether it is online (seen in the last 90 seconds).

On the server API, port 21114.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `token` | query | string | yes | The link's token |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `valid` | `true` | yes |  |
| `view_only` | boolean | yes |  |
| `expires_at` | string (date-time) | yes |  |
| `label` | string | yes |  |
| `devices` | array of object | yes |  |
| `devices[].id` | string | yes |  |
| `devices[].online` | boolean | yes |  |
| `devices[].hostname` | string | yes |  |
| `devices[].os` | string | yes |  |
| `devices[].display_name` | string |  | Only for a device the server knows |
| `devices[].device_type` | string |  | Only for a device the server knows |

| Error | When |
|---|---|
| 400 | No token |
| 403 | The link is not good: unknown, expired, revoked or used up |

## GET /api/guest/access-links/validate

Check a guest link's token.

Needs no sign-in: the token is the credential. A link that is not good still answers 200, with valid false and the reason. An expired link is deleted.

On the server API, port 21114.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `token` | query | string | yes | The link's token |
| `peer_id` | query | string |  | A device the link must open; left out checks only the link |

**200**: Done (`application/json`)

[GuestLinkPublic](https://docs.neode.sk/de/development/api-reference/schemas.md#guestlinkpublic) or object.

| Error | When |
|---|---|
| 400 | No token |

## DELETE /api/guest/access-links/{id}

Revoke a guest link.

A caller that is no admin may revoke only the links it made.

On the server API, port 21114. Needs `guest.create`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The link's id (see guest-links list) |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `revoked` | `true` | yes |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The role lacks the permission, or the link is another account's |
| 404 | There is no such item |
