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

Where can I get a token for the Terra iOS SDK

All

AfraidButterfly31 months ago

The docs on setting up the Terra iOS SDK says I need a token in order to call the initConnection method in this guide. How can I get this token? I don't see it available in the dashboard...

Thanks in advance

terra

Alexadmin31 months ago

Hey

The token needed to initialise the Terra iOS SDK must be generated by making a POST request to the generateAuthToken API endpoint from your backend server, then passed into the frontend (the mobile device). This flow ensures that users are authenticated securely and your private API keys are not exposed. Also, each token has an expiry time of 180 seconds (3 minutes)

Implement a backend endpoint that looks something like this:

Then, use the token in your mobile app like so: