HEMS uses Bearer Token authentication. All API requests require a valid JSON Web Token (JWT).
Upon registration, you will receive:
- Client ID: A unique public identifier for your organization.
- Client Secret: A confidential key used to acquire access tokens.
Warning: Never share your Client Secret in client-side code, public repositories, or with unauthorized personnel.
To interact with the HEMS API, you must first exchange your credentials for a short-lived access token using the OAuth 2.0 Client Credentials flow.
POST /oauth/token
Authentication is done via HTTP Basic Auth — pass your client_id as the username and client_secret as the password.
curl -i -X POST \
-u <client_id>:<client_secret> \
https://api-hems.obeliskapp.com/oauth/token \
-H 'Content-Type: application/json' \
-d '{"grant_type": "client_credentials"}'{
"access_token": "eyJh...",
"token_type": "Bearer",
"expires_in": 3600
}All protected requests must include the Authorization header:
Authorization: Bearer <your_access_token>Note: Access tokens are valid for 1 hour. After expiry, request a new token using your Client ID and Client Secret.