Terra

Integration

API
Unified API
SDK
SDK
Authentication
Authentication
Streaming
Streaming
Blood
Blood Report API
Planned Workout
Planned Workout
AI Interface
AI Interface

User engagement

Graph API
Graph API
Scores
Health Scores
Rewards
Health Rewards

Use cases

Enterprise
Enterprise
Insurance
Insurance

Developers

Wearable Data
Wearable Data
Community
Community
Documentation
Documentation

Learn

Blog
Blog
Podcast
Podcast
Events
Events
Reports
Reports

Company

Customers
Customers
Careers
Careers
Partners
Partners
Support
Support
Become an integration
Become an integration


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

zap

Latest

zap

Popular

API

Unified API

SDK

Phone SDK

Authentication

Widget

Streaming

Streaming

Graph API

Graph API

Authentication flow

All

RegulatoryHeron7 months ago

Hi, how long is the token valid for, does it expire hen i revoke it/logout or it has short time expiry, I'm asking because i have a case where i want demo user to be authenticated for long time

terra

Vanessaadmin5 months ago

Hey there,

The token you generate from /auth/generateAuthToken lives for 180 seconds (3 minutes). This is totally normal, it’s a one-time token used only to kick off the initial initConnection() flow in Terra’s mobile SDKs.

Once the user goes through that first connection step:

You’re done with tokens. Terra takes over all authentication behind the scenes.

The connection stays active and users don’t need to re-authenticate.

The short expiry doesn’t affect ongoing data access. It only applies to that first connection screen.

For your demo user, this won’t cause any issues as long as initConnection() happens within those 3 minutes, the user will stay connected for the long term. Terra keeps everything authenticated automatically.