1. Devices API
  2. Get User Data
GET

/user

x-api-key*
curl --request GET \
     --url https://api.metriport.com/user \
     --header 'x-api-key: AUTH_VALUE'

Query Params

userIdRequired
string

The Metriport user ID to create a session token for.

dateRequired
string

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.

Response

user
User[]

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

import { Metriport } from "@metriport/api";

const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");

const response = await metriportClient.getUserData(
  "metriportUserId",
  "date"
);
[
  {
    "age": 27,
    "city": "San Francisco",
    "country": "US",
    "date_of_birth": "1995-08-02",
    "email": "contact@metriport.com",
    "region": "CA",
    "sex": "male"
  }
]