Authentication

Before you can request data from our API, you need to obtain a valid Bearer token by logging in with your username and password. We recommend creating a dedicated API user in Docksters, so you don’t need to use your personal credentials.


Obtain a bearer token

For any request made to the Docksters API you will need to supply a Bearer token. The API call below will allow you to retrieve said token by supplying your Docksters username and password in the request body, and API key in the URL.

Example request to obtain a bearer token

curl https://api.docksters.io/login/YOUR_API_KEY_HERE \
  -d '{"username":"YOUR_USERNAME", "password": "YOUR_PASSWORD"}'

Authorization header

The Bearer token needs to be appended to the Authorization header in each subsequent call made to the Docksters API. Bearer tokens are valid for 60 minutes after retrieval.

Example request with bearer token

curl https://api.docksters.io/devices/list \
  -H "Authorization: Bearer {token}"