Kick-start your implementation

The following resources will help you quickly integrate the OAuth2.0, Data API and Data Update Notification services.

Postman collection

This Postman collection will allow you to quickly make requests to the OAuth2.0, Data API and Data Update Notication services : https://github.com/withings-sas/api-oauth2-postman

OAuth2.0 sample code

You can use this python sample code to help you implement the OAuth 2.0 application flow.

Demo user

A demo user is available to test the authentication flow, as well as to test fetching data from a user.

To get access to the demo user's data, during step one of the OAuth 2.0 application flow, you can use the optional parameter mode with the value demo. You will be redirected to the authorisation page and automatically logged in as a demo user. For a normal user, once you click the Accept button you will be able to retrieve the authorisation code and then the access_token and refresh_token.

Note: measures are generated every day and demo users will automatically be unlinked from your application after one day.

Example:

http://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=XXXXX&state=a_random_value&scope=user.info,user.metrics,user.activity&redirect_uri=XXXX&mode=demo