Newbie help! API Token problems

Hi all, new here…

I’ve just set up a sub-domain using dyndns …

I need to add an A record in order to point it to my vps and i can see that this is done via the API.

I’ve tried following the documentation, but have to admit I’m a bit new to all this…

At the moment i seem to be having trouble with the token authorization, here’s what I’ve tried:

  • in WSL bash terminal (windows 10) - [just to see if I can list my domain]

curl -X GET https://desec.io/api/v1/domains/ --header “Authorization: Token <>”

this returns :
“detail”:“invalid token”

the trouble is, I’m not entirely sure which token I should be using!

There was a token given when I created my domain, which I failed to note down!

then… there’s the tokens under “token management”, two of which are listed as “login” and the other is “dyndns” - i’ve tried them all but get the same result

I wonder if there are any “idiot guides” here in the forum, or if anyone might like to give me some advice?

ah i see… “generate new token”… that worked!

maybe I’ll make some progress with the API now! :slight_smile:

Hey blockhead, welcome to deSEC!

For future reference, the token ID from the token management list is not the token value. We’ll have to figure out a way to make this clear – this is something that caused confusion a couple of times in the past already.

Best,
Nils

Hi, thanks Nils - I figured that out eventually! I managed to get the API to work by following the docs. Thanks! :slight_smile:

We are working on improving the UX to reduce the confusion between token IDs and token values. In a future release of the docs and GUI, the token value will be called token secret, the ID column will be hidden from the GUI. Details and a screenshot are available on GitHub.

Best,
Nils