User v2 - Activate

POST {{base_url}}/v2/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_addressof 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.

Click here to read the complete API reference for this webservice.

Request Body

[{"name"=>"action", "value"=>"activate", "datatype"=>"string"}, {"name"=>"client_id", "value"=>"{{client_id}}", "datatype"=>"string"}, {"name"=>"nonce", "value"=>"{{nonce}}", "datatype"=>"string"}, {"name"=>"signature", "value"=>"{{signature}}", "datatype"=>"string"}, {"name"=>"mailingpref", "value"=>"0", "datatype"=>"number"}, {"name"=>"birthdate", "value"=>"832114554", "datatype"=>"number"}, {"name"=>"measures", "value"=>"[{\"value\":190,\"unit\":-2,\"type\":4},{\"value\":90,\"unit\":0,\"type\":1}]", "datatype"=>"string"}, {"name"=>"gender", "value"=>"0", "datatype"=>"number"}, {"name"=>"preflang", "value"=>"en_US", "datatype"=>"string"}, {"name"=>"unit_pref", "value"=>"{\"weight\":1,\"height\":6,\"distance\":6,\"temperature\":11}", "datatype"=>"string"}, {"name"=>"email", "value"=>"john.doe@example.com", "datatype"=>"string"}, {"name"=>"timezone", "value"=>"America/New_York", "datatype"=>"string"}, {"name"=>"shortname", "value"=>"JDE", "datatype"=>"string"}, {"name"=>"external_id", "value"=>"my-external-id", "datatype"=>"string"}, {"name"=>"firstname", "value"=>"John", "datatype"=>"string"}, {"name"=>"lastname", "value"=>"Doe", "datatype"=>"string"}, {"name"=>"phonenumber", "value"=>"+19159969739", "datatype"=>"string"}, {"name"=>"recovery_code", "value"=>"f3497gf43i789", "datatype"=>"string"}, {"name"=>"mac_addresses", "value"=>"[\"00:24:e4:72:ad:37\"]", "datatype"=>"string"}]

RESPONSES

status: OK

{"status":503,"body":{},"error":"Invalid Params wrong HEIGHT value : out of range"}