Skip to content

Incompatibility with Headscale 0.26.1 – preauthkey requires numeric user ID instead of username #88

@jecabe

Description

@jecabe

I’m testing headscale-admin against Headscale 0.26.1. The UI mostly works, but creating or listing preauthkeys fails with a 400 Bad Request error.

Details

Headscale version: 0.26.1

headscale-admin version: v0.25.6 (admin.zip release)

Environment: Debian 12 + Caddy proxy

API URL configured in UI: http://IP/api

HRGET http://192.168.1.250/api/v1/preauthkey?user=MYUSER
[HTTP/1.1 400 Bad Request 55ms]

Uncaught (in promise) Error: parsing field "user": strconv.ParseUint: parsing "MYUSER": invalid syntax

Observation

In Headscale 0.26.1, the /api/v1/preauthkey endpoints still expect the user field to be a numeric ID (e.g. 1), not the username.

For example, with the CLI:

headscale preauthkeys create --user 1 --reusable

works, but

headscale preauthkeys create --user MYUSER

fails with the same parsing error.

Expected behavior

The UI should either:

  • Detect that Headscale 0.26.x requires user= and use the numeric ID, or
  • Clearly document that headscale-admin requires a newer Headscale version where username is supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions