API
Authorization and Access Token
The API offers two independent authorization methods.
Authorization Methods:
bearerAuth: HTTP Bearer, JWT format (Authorizationheader).apikeyAuth: API key in thex-api-keyheader.
Method 1: API Key (apikeyAuth)
A permanent key that you create in advance via POST /apikeys (see section 6.5.4).
- Request header:
x-api-key: <your_key> - The key has no expiration date. Delete via
POST /apikeys/delete. - Does not require a device password and does not require the
/unlockendpoint — simply include the key in the header of each request. - Suitable for scripts, automation, Postman collections, and external integrations.
Method 2: Bearer Token / JWT (bearerAuth)
A temporary token that can be obtained on demand using the device password. How to obtain a token:
- Send the device password in the request body to
POST /unlock:
{"pw":"device_password"}
- If the password is correct, the server will return a token:
{"token":"eyJhbGciOiJIUzI1NiIs..."}
- This token is then included in the header of each subsequent request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...