---
title: "OAuth 2.0 - Retrieve a new authorization code"
method: POST
path: "  https://wbsapi.withings.net/v2/oauth2"
tags: ["oauth2"]
---

# OAuth 2.0 - Retrieve a new authorization code

`POST   https://wbsapi.withings.net/v2/oauth2`

## Request

- Base URL: `https://wbsapi.withings.net`
- URL: `https://wbsapi.withings.net/  https://wbsapi.withings.net/v2/oauth2`
- Auth: none declared

**This service will only work for partners having signed a contract with Withings (Withings Mobile SDK or Withings Cellular).** To generate a new authorization code for standard end-user accounts, your user will have to authorize your application to the Web Authorization Flow again.<br/><br/>This service allows you to retrieve a new authorization code in the event that the refresh token is invalid for a user belonging to your namespace.

## Query parameters

- `action` string, required
- `client_id` string, required
- `nonce` string, required
- `signature` string, required
- `userid` integer, required

## Response `200`

(Click to unfold)

- object
  - `status` integer: Response status. See <a href='#tag/response_status'>Status</a> section for details.
  - `body` object: Response data.
    - `user` object
      - `code` string: Authorization Code that must be used to retrieve access_token and refresh_token. (Read the "Get access to your user's data" section of your [integration guide](/developer-guide/v3/withings-solutions/integration-guides) to learn more about how to get this parameter.)

---

[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)
