Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. Nothing beyond essential cookies runs until you choose. You can change your mind any time in our Cookie Policy.

  • Unified API
  • Mobile SDK
  • Connection Widget
  • Streaming
  • Lab Reports API
  • Graph API
  • Health Scores
  • Health Rewards
  • Workouts & Routes
  • Predictions
  • Lab Testing
  • DNA Testing
  • AI Interface
  • Enterprise
  • Insurance
  • Integrations
  • Research
  • Podcast
  • Blog
  • Reports
  • Events
  • Documentation
  • Community
  • Example apps
  • Wearable Data
  • About
  • Customers
  • Partners
  • Startup Accelerator
  • Careers
  • Support
  • Pricing
Terra
Pricing
Become an integrationGet started


zap

Latest

zap

Popular

API

Unified API

SDK

Phone SDK

Authentication

Widget

Streaming

Streaming

Graph API

Graph API

Authentication flow

All

RegulatoryHeron12 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

Vanessaadmin10 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.