External Applications
The External Applications section allows you to register and manage third-party integrations that can securely access your device data. Each external application is issued a unique Client ID and Client Secret for authenticated access.

The External Applications page displays all registered applications in a table with the following columns:
- External Application Name
- Created At – date and time the application was registered
- Status – current state (Enabled / Disabled)
Create New Application
Click the Create New External Application button on the top-right of the page.

In the creation form, fill in the required fields:
- Application Name – Enter a unique, descriptive name for the external application.
- Expiration Date – Select the date on which the application credentials will expire.
- Include Anomalies
- Device – Select devices whose data the application can access.
- Device Groups – Optionally select a device group to include all devices within it
Click Save to register the application.
Upon successful creation, a confirmation dialog will appear displaying the application credentials:

The dialog shows the Client ID and Client Secret for your new application.
Use the eye icon buttons to reveal/hide the values, then copy them to a secure location.
NOTE: Please copy and securely store the secret key for future use. The Client Secret and Client Id will NOT be shown again after you close this dialog.
Click Done to close the dialog. The application will now appear in the list.
Each application in the list has a three-dot menu (⋮) on the right side. Clicking it reveals the following actions:

View
Select View from the actions to open the read-only External Application Details.

This action displays all configured properties of the application including Application Name, Expiration Date, Include Anomalies setting, selected Device, and Device Groups.
Edit
Select Edit from the dropdown to open the Update External Application Details.

Modify any of the following fields as needed:
- Application Name
- Include Anomalies toggle
- Device selection
- Device Groups selection
Click Update to save your changes, or Cancel to discard them.
Delete
Select Delete from the actions to remove an external application.
Rotate Secret
Select Rotate Secret from the actions to generate a new Client Secret for the application.
A confirmation dialog will appear. Confirm the action to proceed with rotation.
Upon confirmation, the system will generate a new Client Secret and display a success message:
- he dialog will show the Client ID (unchanged) and the new Client Secret
- Use the eye icon to reveal each value, then copy them to a secure location.
Click Done to close the dialog.
Disable / Enable
Select Disabled from the actions to deactivate an active external application.
The application's Status in the list will change from Enabled to Disabled.
API Integration
Once an External Application is created and its credentials are secured, you can use them to authenticate against the OneSense API and stream live device telemetry into any external system — a web page, Grafana dashboard etc.
Generate an Access Token
Before calling any streaming endpoint, you must exchange your Client ID and Client Secret for a short-lived Bearer token.
Token Endpoint:
- Method: POST
- URL: https://onesenseapi.azurewebsites.net/connect/token
- Content-Type : x-www-form-urlencoded
Request Body Parameters
- grant_type: client_credentials (fixed value — always use this)
- client_id: Your application's Client ID
- client_secret: Your application's Client Secret
A 200 OK response contains a JSON object with an access_token field.
NOTE: Access tokens are short-lived (typically 60 minutes). Your application should detect 401 Unauthorized responses and request a fresh token using the same Client Credentials flow.
Streaming
The telemetry streaming endpoint uses Server-Sent Events (SSE). Once connected with a valid Bearer token, the server pushes device data in real time as events arrive
Streaming Endpoint:
- Method: GET
- URL: https://onesenseapi.azurewebsites.net/v1/stream/telemetry
- Accept : text/event-stream
- Auth : Bearer
How It Works
- The server validates the Bearer token and extracts the permitted device IDs and tenant from the token claims.
- The connection stays open and the server pushes new telemetry events as they arrive from your devices.
- Each event is a JSON payload containing device readings