A quick introduction to building with Vital
EU
or US
),
the region dictates where data is stored. You can learn more at regions.
To create a team and get your API keys, you first need to sign up for a Vital account in the Dashboard.
Once registered, you can create a team by hovering over your username at the bottom of the Dashboard sidebar.
A team is associated with a region (either EU
or US
), the region dictates where data is stored.
You can learn more at regions.
To create your API keys, go to the configuration section of the Dashboard.
For each region, you’ll have access to two environments Sandbox and Production.
We’ll start in the Sandbox environment, so create a new Sandbox API key.
Environment | ||
---|---|---|
sandbox | Testing, Connect up to 10 live users | api.sandbox.tryvital.io |
production | Live environment to use with real customers | api.tryvital.io |
.env
file with your own Vital API_KEY
and finally, building and running the app.
http://localhost:3000
.
user_id
as input.
A user_id
is a unique representation that we hold for a user. It allows you to fetch data for that user.
To create a user, you need to pass an unique id (client_user_id
). This represents the user in your system. Our recommendation is
to store the Vital user_id
in your db against the user row.
user_id
parameter.client_user_id
and tap Create:
link_token
by making a /link/token
request and passing in the
required configuration. This link_token
is a short lived, one-time use token that authenticates your
app with Vital Link, our frontend module.
link_token
, you can use it to initialize Link
. Link
is a drop-in client-side
module available for web, iOS, and Android that handles the authentication process.
The Quickstart uses Link
on the web, which is a pure JavaScript integration that you trigger via your own client-side code.
/summary/sleep
, which retrieves sleep
summary data for a user. The request is simple and requires the Vital
user_id
, start_date
and end_date
.
Getting user sleep data
vital-python | Python library for calling Vital API on your backend |
vital-link | React Library for initializing link |
vital-node | Vital Node Client |
vital-ios | Vital iOS Client |
Java | Soon to be added |
Go | Soon to be added |