Invalid token on getting dns

I keep getting {"detail":"Invalid token."}
when I use
curl -X GET https://desec.io/api/v1/domains/bronsted.dk/ --header "Authorization: Token <my-dedicated-token-in-from-the-ui>" --header "Content-Type: application/json"

Hi, please make sure that the token is not expired. The UI shows you if a token can still be used. Additionally, please make sure that the IP address of the client is in the allowed range (if you set up any).

Hi sorenbronsted,

Thank you for your message, and welcome to deSEC! :slight_smile:

Does the value you used as a token only contain characters 0-9, a-f and -? If so, you probably have used the token ID instead of the token value. The ID cannot be used for authorization, you need to use the token value.

The token value is only displayed once, directly after the token is created.

Does that help?

Stay secure,
Peter

Hi, thank you for your quick response and yes I had taken the token ID instead of the token value. I had forgot that the value was only show once.