Authentication

Open data devices, API keys per device and OAuth 2.0 for users.

The Senstate APIs use API keys or a bearer token to authenticate requests. You can view and manage your API keys in the device permissions on Senstate.Cloud. When a device is marked as an open data device, you can access its data without authentication (without an API key).

Open data

All devices that their owners have marked as "Open Data Enabled" have their data publicly accessible on all Senstate APIs. You can access the data without an API key or any other authentication, within some limits:

API keys

API keys authenticate on a device basis: each device owner can create API keys for their device, and whoever has an API key can access the data of that device through the APIs.

API keys are created on the Permissions page of a device on the cloud platform. Only the owner of the device, an administrator or a custom role with the Manage API Keys permission can create keys.

Send the API key in a header named accessKey with every request:

headers = { 'accessKey': 'YOUR_ACCESS_KEY' }

OAuth 2.0

The OAuth 2.0 framework is used to authenticate users. It gives higher permissions to access all services, not only the open data APIs. A bearer (JWT) token is sent for site-wide authentication across the services.

OAuth 2.0 authentication is currently in test mode.

Developer resources