When authenticating against the open API, you have two options to choose from. One is to use your email & password, while the other uses Authorization: Bearer <token>.
Example command using password
curl -X GET "https://min.hostup.se/api/dns" \
-d username="[email protected]"\
-d password="password"
The username/password combination is the same as the one you use to log in to your client area.
Authentication with Limited Permissions
If you only want to grant permissions for the user to do certain things via the API, such as only managing DNS records for one of your domains, you can create a “dummy user” and then grant them permissions for this. Do this also if you are using 2FA on your account.
- Navigate to the page for creating a contact.
- Create a contact with optional information, for example N/A for name and [email protected] for email.
- Choose a strong password and finally give the account the permissions you want to be able to use via the API. In the example below, I give the user permissions to manage DNS for example.com
Now your new user can use the API!
curl -X GET "https://min.hostup.se/api/dns" \
-d username="[email protected]"\
-d password="password"
Was this article helpful?
Tack för din feedback!