---
title: "Generate Guacamole connection token from host configuration"
method: POST
path: "/guacamole/connect-host/{hostId}"
tags: ["Guacamole"]
---

# Generate Guacamole connection token from host configuration

`POST /guacamole/connect-host/{hostId}`

Fetches host configuration from database and generates a connection token for RDP/VNC/Telnet

## Path parameters

- `hostId` integer, required

## Request body

- object
  - `protocol` 'rdp' | 'vnc' | 'telnet' — Override the host's default connection type
  - `promptedUsername` string — Username for this connection only, used when the host's RDP auth type is "none". Not persisted.
  - `promptedPassword` string — Password for this connection only, used when the host's RDP auth type is "none". Not persisted.

## Response `200`

Connection token generated successfully

- object
  - `token` string — Encrypted connection token
  - `guacamoleConnectionId` string, nullable — guacd's own connection id for this session, once the handshake completes. Used to mint session-share join tokens.

## Other responses

- `400` — Invalid request or unsupported connection type
- `403` — Access denied to host
- `404` — Host not found
- `500` — Server error

---

[API](https://skmtc.dev/termix/apis/termix-api.md) · [All operations](https://skmtc.dev/termix/apis/termix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/termix/termix-api/revisions/f4ef343eff1b/schema)
