Authentication

How to authenticate to the Things5 HTTP API and which method to use.

Every HTTP API request needs an access token, sent in the Authorization header:

GET https://api.things5.digital/v1/organizations/{organization_id}/devices
Authorization: Bearer <access_token>

Tokens are issued by the Things5 authentication service at https://auth.things5.digital/auth/realms/{realm-id} with standard OAuth 2.0 / OpenID Connect. Your realm-id is described in General parameters. The OpenID configuration of your realm is at https://auth.things5.digital/auth/realms/{realm-id}/.well-known/openid-configuration, so any OIDC library can be used.

Which method to use

Who calls the APIMethodPage
Software without a person: factory stations, server-to-server integrations, scheduled jobsAPI integration (client_credentials grant). Created by an organization administrator in Administration → API integrationsGet access token (API integration)
An application used by people (web or mobile app)Authorization code flow with PKCE, users log in with their own Things5 accountExternal app integration via OAuth
A device that needs to act on behalf of a user (e.g. log in by scanning a QR code)Token exchange over MQTTToken exchange
Existing scripts that log in with a username and passwordPassword grant: deprecatedGet access token (username and password)

🚧

Username and password access is being phased out

From December 1, 2026 new API users can no longer be created. On June 30, 2027 API access with username and password is switched off. Move stations and integrations to API integrations. See Secure device provisioning.

Permissions

An access token carries the permissions of the user or API integration it was issued to: the API returns only the organizations, devices and data they can see, and answers 403 to operations they are not allowed to perform. An API integration has no organization role: give it a role on the device groups it needs. See Permissions.

Errors

StatusMeaning
401Missing, invalid or expired token: request a new one
403The token is valid but the user or integration lacks the permission
429Too many requests: retry after the number of seconds in the Retry-After header