oauth2

Authorization URL

To use the Web Authorization Flow, you'll need to construct an authorization URL with the appropriate query parameters. Here's an example of an authorization URL:<br><br>

https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=YOUR_CLIENT_ID&scope=user.info,user.metrics,user.activity&redirect_uri=YOUR_REDIRECT_URI&state=YOUR_STATE

Replace YOUR_CLIENT_ID, YOUR_REDIRECT_URI, and YOUR_STATE with your actual values.<br><br> When someone navigates to this URL, they will be asked to authorize your application for the requested scopes. Upon granting permissions, the user will be redirected to your specified redirect_uri, which will include an additional query string parameter called code. The state parameter will also be returned and should be validated at this point. <br><br> Please note that the authorization code is only valid for 30 seconds.

gethttps://account.withings.com/oauth2_user/authorize2

Request

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

Query parameters

response_typestring required

Must take the constant string value code.

client_idstring required

Your Client ID.

statestring required

A value you define. This can be used to make sure that the redirect back to your site or app wasn’t spoofed.

scopestring required

A comma-separated list of permission scopes to request from the user. See the available scopes for the full list and the actions they allow.

redirect_uristring required

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.<br />Examples:<br /> <ul> <li>Callbacks: https://mydomain.com/</li> <li>Callback: https://mydomain.com/,https://mydomain2.com/</li> <li>Valid URL: https://mydomain.com/relative_path?args=value</li> </ul>

modestring

Only set to use the demo user. For demo user must take the constant string value demo.

Response

(Click to unfold)

Changes

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