[Bug] api for preauthkeys doesn't work properly
Author: ChxGuillaumeCreated Jul 6, 2026Updated Aug 26, 2026
Labelsbug
Is this a support request?
- This is not a support request
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Ince the re implementation in https://github.com/juanfont/headscale/commit/c9bbb5bdec1dd52ed91248a718d74acb7b52e493 the behavior of the POST /api/v1/preauthkey route doesn't work the intended way
When giving a username it doesn't work like before and returns a 400 Bad Request
proto: (line 1:9): invalid value for uint64 field user: "[email protected]"
Expected Behavior
It should create and return the preauthkey
Steps To Reproduce
- POST on
/api/v1/preauthkeywith a correct username for the property "user" - Should return an error similar to
proto: (line 1:9): invalid value for uint64 field user: "[email protected]"
Environment
- OS: Ubuntu 22.04 / Docker
- Headscale version: 0.29.x (tested on .1 and .2)
- Tailscale version: (On API so not relevent for this issue)Runtime environment
- Headscale is behind a (reverse) proxy
- Headscale runs in a container
Debug information
Running on any standard Headscale instance in 0.29.2, this is an API issue
Source: juanfont/headscale