1. Setting up

Getting Started

Setting up

Authenticate Users

Getting Data

Parsing Data

API Settings

Mobile Setup






Data Models

Your Terra credentials

Head to the Terra dashboard. Under API > Customise, you will find your API Key, Dev ID and Signing Secret. They are used in virtually every interaction with the API - keep them safe!

Choose your language

You can interact with the API using one of the following options:


Install the package using npm or yarn:

npm i terra-api
yarn i terra-api

Initialise the Terra Object

You can now import the Terra class and initialise an instance using your developer credentials.

// Importing the API and instantiating the client using your keys
const { default: Terra } = require("terra-api");

const API_KEY = "<Your API Key>"
const DEV_ID = "<Your Dev Id>"
const SECRET = "<Your Signing secret>"

const terra = new Terra("DEV_ID", "API_KEY", "SECRET");

You will now be able access Terra's API endpoints through the Terra object.

Listing Providers and Users

To start off, let's view the most up-to-date list of all data providers through Terra. Use the getProvidersmethod on terra to get an API response, in the form of a JavaScript object.

  .then((p) => {

You should see the following output:

  status: 'success',
  providers: [
    'COROS',       'CRONOMETER',    'DEXCOM',
    'GARMIN',      'GOOGLE',        'HAMMERHEAD',
    'HUAWEI',      'IFIT',          'INBODY',
    'KOMOOT',      'LIVEROWING',    'LEZYNE',
    'MOXY',        'NUTRACHECK',    'OMRON',
    'OMRONUS',     'OURA',          'PELOTON',
    'POLAR',       'PUL',           'RENPHO',
    'RIDEWITHGPS', 'ROUVY',         'SUUNTO',
    'TECHNOGYM',   'TEMPO',         'TRIDOT',
    'WAHOO',       'WEAROS',        'WHOOP',
    'WITHINGS',    'XOSS',          'ZWIFT',
    'KETOMOJOEU',  'STRAVA',        'CLUE',

Similarly, to view a list of users that you have currently authenticated through Terra, use the getUsers method.

  .then((p) => {

If you haven't authenticated any users yet, you should receive an empty list in the returned object:

  status: 'success',
  users: []

For detailed documentation on any of the functions used, checkout the JavaScript Client Reference.

In the next step, let's get some users authenticated!