Actions11
- Activity Actions
- Measure Actions
- Sleep Actions
- User Actions
Sleep → Get Summary
AI-generatedOverview
This node interacts with the Withings API to retrieve a summary of sleep data for a user. It supports authentication via OAuth2 credentials or a manual access token. Users can specify additional parameters such as start date, end date, last update timestamp, and offset to filter the sleep summary data. It also allows selecting specific types of sleep data fields like heart rate, respiration rate, and snoring data to be included in the summary. This node is useful for applications that need to analyze or display summarized sleep metrics from Withings devices, such as health monitoring dashboards or sleep tracking reports.
Use Case Examples
- A health app fetching a user's sleep summary for the past week to display trends in sleep quality.
- A wellness platform integrating Withings sleep data summaries to provide personalized sleep improvement tips.
Properties
| Name | Meaning |
|---|---|
| Authentication Method | How to authenticate with Withings API, either using stored OAuth2 credentials or a manual token from a previous node. |
| Access Token (From Previous Node) | The access token used for manual authentication, required if manual authentication method is selected. |
| Additional Fields | Optional parameters to filter the sleep summary data, including start date, end date, last update timestamp, and offset for pagination. |
| Data Fields | Types of sleep data to retrieve in the summary, such as heart rate, respiration rate, and snoring data. |
Output
JSON
success- Indicates if the API call was successful.resource- The resource type, here it will be 'sleep'.operation- The operation performed, here it will be 'getsummary'.body- The raw response body from the Withings API containing the sleep summary data.data- The sleep summary data if the response body is not present.error- Error message if the API call failed.status- HTTP status code returned by the API.errorCode- Specific error code returned by the API if any.
Dependencies
- Withings API
- OAuth2 credentials or manual access token for authentication
Troubleshooting
- Ensure the OAuth2 credentials or manual access token are valid and not expired to avoid authentication errors.
- If using manual token authentication, the token must be refreshed regularly using a Token Exchange node to prevent failures.
- API errors include status codes and messages; check these to understand issues like invalid parameters or rate limits.
- Network issues or API downtime can cause request failures; retrying after some delay may help.
Links
- Withings API Sleep Summary Documentation - Official documentation for the Withings API endpoint to get sleep summary data.