GET
/
user
curl --request GET \
  --url https://api.sandbox.metriport.com/user \
  --header 'x-api-key: <api-key>'
import { MetriportDevicesApi } from "@metriport/api-sdk";

const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");

const response = await metriportClient.getUserData("metriportUserId", "date");

Query Params

userId
string
required

The Metriport user ID to create a session token for.

date
string
required

Day for which to pull the data. Formatted YYYY-MM-DD.

For simplicity, all queries assume the UTC timezone for the specified date starting at 00:00 to 23:59 - unless otherwise specified by the timezoneId parameter.

timezoneId
string

Timezone ID to use for the specified date. If not specified, the UTC timezone is used. For example this can be valid timezones like America/Los_Angeles or Europe/Kiev.

Support for this parameter is under development, and currently only supported for the Google Fit provider.

Response

user
User[]

An array of user objects for each of the user’s connected providers

[
  {
    "age": 27,
    "city": "San Francisco",
    "country": "US",
    "date_of_birth": "1995-08-02",
    "email": "contact@metriport.com",
    "region": "CA",
    "sex": "male"
  }
]