Onboarding
July 14, 2026
1 min read

Using short-term tokens

Using short-term tokens

If you're integrating the Shen AI Web SDK, one of the first security decisions you'll make is how your application authenticates with the SDK. During development, it's common to use an API key directly. For production deployments, however, we recommend using short-term tokens instead.

Anything that runs in a web browser should be treated as publicly accessible. A permanent SDK key embedded in frontend code can be discovered. Short-term tokens help reduce that risk by keeping your permanent credentials securely on your backend.

How short-term tokens work

Instead of sending your SDK key to the browser, your backend generates a temporary token whenever a user starts a measurement. The frontend uses that token to initialize the Web SDK, while the permanent SDK key never leaves your server.

Because these tokens are temporary, you can configure them to match your use case - for example, allowing a single measurement or limiting them to a specific period of time.

When should you use them?

We recommend short-term tokens for all production Web SDK deployments. They're particularly useful when users start measurements through:

- web applications,
- patient or customer portals,
- chatbots,
- WhatsApp or SMS links,
- one-time health assessments or invitation links.

In these scenarios, each measurement session can be authorized individually without exposing long-lived credentials.

Using short-term tokens helps you:

- keep permanent SDK credentials on your backend,
- reduce the risk of unauthorized or unintended use,
- control how long a token remains valid,
- limit access to a single scan or another predefined scope,
- better control scan usage in publicly accessible applications.

Learn more

For implementation details, API endpoints, and configuration examples, see the Short-term tokens section of the developer documentation.

Share this post

More blog posts

Sagittis et eu at elementum, quis in. Proin praesent volutpat egestas sociis sit lorem nunc nunc sit.

Blog
July 31, 2026
4 min read

[Press] Shen AI's vital signs are now certified: Introducing the Medical SDK

Choosing the right SDK is crucial for aligning your product’s regulatory pathway, claims, customization, and go-to-market timeline. Explore this breakdown comparing Shen AI’s three camera-based health monitoring SDK options.

Read more
Blog
July 31, 2026
4 min read

Shen AI SDK comparison: Wellness, General Wellness US, and Medical

Choosing the right SDK is crucial for aligning your product’s regulatory pathway, claims, customization, and go-to-market timeline. Explore this breakdown comparing Shen AI’s three camera-based health monitoring SDK options.

Read more
Blog
July 31, 2026
2 min read

Shen AI's vital signs are now certified: Introducing the Medical SDK

Shen AI now offers a certified Medical SDK under MDR for heart rate, HRV, breathing rate, and blood pressure estimation. Discover how choosing between Shen AI’s Medical and Wellness SDKs helps align your regulatory pathway, clinical validation, and go-to-market timeline.

Read more