Open MrMalfunction opened 2 months ago
I'm having the same issue how did you solve it? Thanks
Well the solution is the replace "nodekey" in the actual request with "mkey" as mentioned above. I just have a curl copied from the browser in postman where I just replace the keys of with new key every time I need to do it.
When working with latest headscale release the api to register new nodes needs key to start with "mkey" not "nodekey" Manual API Call shows the error:
curl 'https://example.com/api/v1/node/register?user=amol&key=nodekey:d0931bbf4a39f3538b641ae5d10a71245a4ca73367656b29e947b3edb3500a59' \ -H 'accept: application/json' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'authorization: Bearer API_KEY' \ -H 'cache-control: no-cache' \ -H 'content-type: text/plain;charset=UTF-8' \ -H 'dnt: 1' \ -H 'origin: https://example.com' \ -H 'pragma: no-cache' \ -H 'priority: u=1, i' \ -H 'referer: https://ts-ui.supplytrace.org/' \ -H 'sec-ch-ua: "Chromium";v="129", "Not=A?Brand";v="8"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: same-site' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \ --data-raw '{}'
Response: {"code":2,"message":"key hex string doesn't have expected type prefix mkey:","details":[]}%