Withings API icon

Withings API

Withings API Integration

Overview

This node integrates with the Withings API to retrieve user-related data, specifically focusing on the "User" resource and the "Get Device" operation. It fetches information about devices associated with a Withings user account, such as smart scales, watches, or other health monitoring devices.

Common scenarios for this node include:

  • Retrieving a list of all devices linked to a user's Withings account.
  • Monitoring which devices are active or available for data collection.
  • Integrating device metadata into broader health or fitness workflows.

Practical example:

  • A health app workflow that first fetches the user's registered devices before pulling measurement data from those devices.

Properties

Name Meaning
Additional Fields Optional parameters to refine the data retrieval:
- Start Date Start date for data retrieval (timestamp)
- End Date End date for data retrieval (timestamp)
- Last Update Retrieve only data updated after this date (timestamp)
- Offset Skip this many records (for pagination or batch processing)

Output

The output is a JSON object containing the response from the Withings API regarding user devices. The structure includes:

  • success: Boolean indicating if the request was successful.
  • resource: The resource queried, here always "user".
  • operation: The operation performed, here "getdevice".
  • Other fields as returned by the Withings API under body, typically including device details such as device IDs, types, model names, and status.

If the API call fails, the output will contain:

  • success: false
  • error: Error message describing the failure
  • status: Status code from the API response
  • errorCode: Specific error code if provided
  • resource and operation for context

No binary data output is produced by this operation.

Dependencies

  • Requires an OAuth2 API credential configured for Withings API access.
  • The node makes authenticated HTTP GET requests to the Withings API endpoints.
  • Network connectivity to https://wbsapi.withings.net is required.
  • Proper scopes and permissions must be granted in the Withings developer account for the OAuth token.

Troubleshooting

  • Authentication errors: Common error messages include unauthorized access, invalid token, expired credentials, or permission denied. Resolution steps:

    1. Reconnect or refresh the OAuth2 credentials in n8n.
    2. Verify that the Withings developer account is active and the app has correct scopes.
    3. Ensure the Withings user account is properly configured and active.
    4. Retry after some time in case of temporary API issues.
  • API rate limits or timeouts: The node implements retries with exponential backoff and random delays to handle transient failures. If persistent failures occur, check API usage limits and network stability.

  • Invalid input parameters: Ensure date/time fields are correctly formatted timestamps. Incorrect values may cause API errors.

Links and References

Discussion