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.
Request
- Base URLhttps://wbsapi.withings.net
- Authnone declared
Query parameters
Must take the constant string value code.
Your Client ID.
A value you define. This can be used to make sure that the redirect back to your site or app wasn’t spoofed.
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.
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>
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.