What is the curl -- user option for?

Reading this here: IP Update API — deSEC DNS API documentation

I wonder what the – user option is for.

For me as a total noob, I first thought that both lines are needed, while you only need one.
I did not understand that this:

curl --user <your domain>:<your token secret> \
  "https://update.dedyn.io/?myipv4=1.2.3.4&myipv6=fd08::1234"

curl "https://update6.dedyn.io/?hostname=<your domain>&myipv4=1.2.3.4&myipv6=fd08::1234" \
  --header "Authorization: Token <your token secret>"

is basically to times the same. Maybe there could be some explanation or separate two lines so they are visually not the same? Something like this:

variant a

curl --user <your domain>:<your token secret> \
  "https://update.dedyn.io/?myipv4=1.2.3.4&myipv6=fd08::1234"

variant b

curl "https://update6.dedyn.io/?hostname=<your domain>&myipv4=1.2.3.4&myipv6=fd08::1234" \
  --header "Authorization: Token <your token secret>"

Hi,

It’s indeed just two variants.

The user option does HTTP basic authentication, and we use the value the same way as the hostname parameter. This is because some clients expect that to work.

Sure! Feel free to create a pull request in our repo.

Stay secure,
Peter

1 Like