Problem
Scale Manager fails to connect to Headscale v0.27+ servers with "invalid api key" error, even when the API key is valid and works correctly in the Headscale Web UI.
Root Cause
Headscale v0.27 changed all API endpoint paths from plural to singular:
| Scale Manager requests |
Headscale v0.27 actual route |
GET /api/v1/nodes |
GET /api/v1/node |
GET /api/v1/users |
GET /api/v1/user |
GET /api/v1/apikeys |
GET /api/v1/apikey |
GET /api/v1/preauthkeys |
GET /api/v1/preauthkey |
GET /api/v1/healthz |
GET /api/v1/health |
All plural endpoints return 404 Not Found, causing the app to display "invalid api key".
The correct routes can be verified via the OpenAPI spec at /swagger/v1/openapiv2.json on any running Headscale instance.
Reproduction Steps
- Deploy Headscale v0.27.1
- Create an API key via
headscale apikeys create
- Enter server URL and API key in Scale Manager
- App shows "invalid api key"
Environment
- Headscale version: v0.27.1
- Scale Manager version: 1.2.5
- Platform: iOS
Suggested Fix
Update the API client to use singular endpoint names matching the v0.27+ API spec. Consider supporting both formats for backward compatibility with older Headscale versions.
Problem
Scale Manager fails to connect to Headscale v0.27+ servers with "invalid api key" error, even when the API key is valid and works correctly in the Headscale Web UI.
Root Cause
Headscale v0.27 changed all API endpoint paths from plural to singular:
GET /api/v1/nodesGET /api/v1/nodeGET /api/v1/usersGET /api/v1/userGET /api/v1/apikeysGET /api/v1/apikeyGET /api/v1/preauthkeysGET /api/v1/preauthkeyGET /api/v1/healthzGET /api/v1/healthAll plural endpoints return
404 Not Found, causing the app to display "invalid api key".The correct routes can be verified via the OpenAPI spec at
/swagger/v1/openapiv2.jsonon any running Headscale instance.Reproduction Steps
headscale apikeys createEnvironment
Suggested Fix
Update the API client to use singular endpoint names matching the v0.27+ API spec. Consider supporting both formats for backward compatibility with older Headscale versions.