---
title: "Authorization URL"
method: GET
path: "https://account.withings.com/oauth2_user/authorize2"
tags: ["oauth2"]
---

# Authorization URL

`GET https://account.withings.com/oauth2_user/authorize2`

## Request

- Base URL: `https://wbsapi.withings.net`
- URL: `https://wbsapi.withings.net/https://account.withings.com/oauth2_user/authorize2`
- Auth: none declared

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.

## Query parameters

- `response_type` string, required
- `client_id` string, required
- `state` string, required
- `scope` string, required
- `redirect_uri` string, required
- `mode` string

## Response `200`

(Click to unfold)

---

[API](https://skmtc.dev/withings/apis/withings-developer-documentation.md) - [All operations](https://skmtc.dev/withings/apis/withings-developer-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/withings/apis/withings-developer-documentation/revisions/9e9accd01d4b?raw)
