Skip to main content

Garmin Sleep Data

This document explains how to access sleep data from Garmin devices using Garmin's API.

Overview​

Garmin provides sleep tracking information through its API. Once the user has been authenticated via the Garmin OAuth flow, you can query for sleep data.

Steps to Retrieve Sleep Data​

  1. Authenticate
    Perform the Garmin OAuth flow to obtain an access token.

  2. Access Sleep Data Endpoint
    Use the access token to make a GET request to the sleep data endpoint.

  3. Process the Response
    Parse the returned JSON for sleep metrics.

Example API Request​

curl --request GET \
--url https://api.garmin.com/wellness-api/rest/sleep \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Further Resources​