Withings API icon

Withings API

Withings API Integration

Overview

This node integrates with the Withings API to retrieve user activity summary data. Specifically, the "Activity" resource with the "Get Summary" operation fetches summarized activity metrics such as steps, calories, distance, and other health-related statistics over a specified time range.

This node is beneficial for scenarios where you want to analyze or monitor a user's physical activity trends over time, generate reports, or trigger workflows based on activity summaries. For example, it can be used in health apps to display weekly or monthly activity summaries or in wellness programs to track progress.

Properties

Name Meaning
Additional Fields Optional parameters to refine the data retrieval:
- Start Date The start date/time (timestamp) from which to begin retrieving activity summary data.
- End Date The end date/time (timestamp) up to which to retrieve activity summary data.
- Last Update Retrieve only data updated after this date/time (timestamp).
- Offset Skip this many records before starting to return results (for pagination or batching).

Output

The node outputs JSON data containing the activity summary retrieved from the Withings API. The output structure includes:

  • success: Boolean indicating if the request was successful.
  • resource: The resource type, here always "activity".
  • operation: The operation performed, here "getsummary".
  • Other fields as returned by the Withings API under the body property, which typically include summarized activity metrics such as total steps, calories burned, distances, and durations aggregated over the requested period.

If the API returns an error, the output will contain:

  • success: false
  • error: Error message string
  • status: HTTP status code or API error code
  • errorCode: Specific error code from the API (if any)
  • resource and operation for context

No binary data output is produced by this node.

Dependencies

  • Requires an OAuth2 API credential configured with Withings to authenticate requests.
  • The node makes HTTP GET requests to the Withings API endpoints.
  • Network connectivity to https://wbsapi.withings.net is required.
  • The node handles token refresh internally but requires valid credentials with appropriate scopes granted.

Troubleshooting

  • Authentication Errors: Common errors include invalid, expired, or revoked tokens. The node attempts retries and token refreshes automatically. If persistent errors occur:
    • Reconnect or reauthorize the Withings account in the credentials.
    • Verify that the Withings developer account and app have the necessary permissions/scopes.
    • Ensure the Withings user account is active and properly linked.
  • API Rate Limits or Temporary Failures: The node implements retry logic with exponential backoff. If failures persist, wait and try again later.
  • Invalid Date Parameters: Ensure that the "Start Date", "End Date", and "Last Update" fields are valid timestamps and logically consistent (e.g., start date before end date).
  • Offset Usage: Using offset incorrectly may result in missing or duplicated data; use carefully when paginating.

Error messages from the node will include suggestions to check credentials, scopes, and account status.

Links and References

Discussion