• Unified API
  • Mobile SDK
  • Connection Widget
  • Streaming
  • Blood Report API
  • Graph API
  • Health Scores
  • Health Rewards
  • Planned Workouts
  • Lab Testing
  • AI Interface
  • Enterprise
  • Insurance
  • Integrations
  • Research
  • Podcast
  • Blog
  • Reports
  • Events
  • Documentation
  • Community
  • Wearable Data
  • About
  • Customers
  • Partners
  • Careers
  • Support
  • Pricing
Terra
Pricing
Become an integrationGet started


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.

Cookies Policy
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

AfraidButterfly27 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

Alexadmin27 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: