Admin API

Admin API

The Admin API is the server-side companion for Shen.AI SDK.

Currently, it lets you avoid embedding your permanent SDK key in client apps/pages by issuing short-lived, narrow-scope tokens to client devices whenever you need them.

Use-caseWhy the Admin API helps
Ship a mobile / web app without hard-coding long-lived secretsStore the permanent key on your backend only.
Limit how many measurements a device can performGenerate a token with max_measurements.
Lock a token to the first device that activates itSet single_device: true.
Generate single-measurement links for the Web SDKEmbed the token in the link URL.

The OpenAPI reference is always the source of truth.
For request/response details go to the automatically generated documentation at:
https://api.shen.ai

Overview of the flow

  1. Server (your backend) authenticates with an Admin Credential (ska_…).
  2. It calls POST /v1/token (or /tokens for bulk) and receives a JSON payload containing the new token.
  3. The client app initializes the SDK with that token instead of the permanent key.
  4. When the token expires (or the measurement cap is reached) the client asks your backend for a fresh one.

What’s next?

;