user

User v2 - Activate

Creates a Withings user, links the devices related to the provided mac_addresses and activates the cellular devices service and invoicing.

Please refer to the Access and refresh tokens section to learn how to use the authorization code you'll get in return of this service in order to fetch user data. The authorization code is only valid for 10 minutes.

Important:

  • Please note that to activate the Withings HUB cellular service, the mac_address of the Withings HUB needs to be passed included in the input mac_addresses along with the other Withings devices.
  • Please note that the devices need to be authorized to be linked by API by the Partner. Please contact Withings for more information on device authorization.

This service is part of Withings Pro Solutions. You won't be able to use it if you did not sign a contract with Withings. Use this service only if you're integrating Withings Cellular Solutions with bulkshipment.

posthttps://wbsapi.withings.net/v2/user

Request

  • Base URL
    https://wbsapi.withings.net
  • Auth
    none declared

Query parameters

actionstring required

Service action name. Must take the string value activate.

client_idstring required

Id of the client

noncestring required

A random token used to prevent replay attacks (Cf. Signature v2 - Getnonce)

signaturestring required

Hash of params (Cf. Signature hash protocol).

mailingprefboolean required

Specifies if customer accepted Withings commercial contacts.

birthdateinteger required

Unix timestamp of user's birthdate

measuresunknown required

User measures (Cf. Measures model).

genderinteger required

0: man, 1: woman

preflangstring required

User language preference. Examples: en_EN / en_US / de_DE / es_ES / fr_FR / it_IT / ja_JA / ko_KR / nl_NL / pt_PT / ru_RU / zh_CN

unit_prefunknown required

Unit pref (cf. Unit preferences model).

emailunknown required

User's email address

timezoneunknown required

User's timezone. Examples: "Europe/Paris" / "America/New_York". A complete list of all possible timezones can be found on the "TZ database name" column of this page : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

shortnamestring required

3 characters representing the end user (ex: for a user named Robert, you could set the shortname param to ROB). These characters will be displayed on device screens when used.<br>Shortname must respect the following regex: /^[a-zA-Z0-9]{3}$/ (either letters or numbers, special characters and spaces are not allowed).

external_idstring required

Unique identifier used by the partner to identify the end-user.

mac_addressesunknown required

List of Withings device MAC addresses that will be linked to the created user. Example: ["00:24:e4:xx:xx:xx","00:24:e4:xx:xx:xx"]

firstnamestring

User's firstname (if not set, will take the same value as shortname)

lastnamestring

User's lastname (if not set, will take the same value as shortname)

phonenumberstring

Phone number in E.164 format. End user will receive a verification code on this phone number for 2 factor authentication if they wish to securely access the data of their program in the withings app in the future (recommended)

recovery_codestring

Recovery code can be used by end user as a 2nd authentication factor in the withings app if they wish to securely access the data of their program in the future. You will be responsible of securely providing this recovery code to your user if he asks for it.

goalsunknown

Goals (cf. Goals model).

redirect_uriunknown

The URI we should redirect the user to after choosing to authorize or not your app. This URI must be set as Callback Url in your partner application. It is possible to use multiple URLs by separating them with a comma.

Examples:

Response

(Click to unfold)

statusinteger

Response status. See <a href='#tag/response_status'>Status</a> section for details.

Example response

{
  "body": {
    "user": {
      "code": "490ed603fe9bd2ce10027bdba0c932069cd27085",
      "external_id": "3b7a6db0-ec7e-479b-9675-2a3d8d6a7e51"
    },
    "devices": [
      {
        "mac_address": "00:24:e4:69:b2:30",
        "type": "Scale",
        "model": "Body Cardio",
        "model_id": 6,
        "battery": "medium",
        "deviceid": "892359876fd8805ac45bab078c4828692f0276b1",
        "timezone": "Europe/Paris",
        "last_session_date": 1594159644,
        "serial_number": "SN-001122334455"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.