---
title: "Signature v2 - Getnonce"
method: POST
path: "https://wbsapi.withings.net/v2/signature"
tags: ["signature"]
---

# Signature v2 - Getnonce

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

## Request

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

A ```nonce``` is a random token that is generated and stored in Withings server with **30 minutes of validity**.

As a partner, you will use this ```nonce``` token in the API services that require a ```signature``` so that Withings can check that the ```nonce``` token is still valid and was never used before. The usage of a ```nonce``` token prevents your service calls from replay attacks.

Because this service is an Device Management service, Withings checks your authorized access using your ```client_id``` and your ```secret``` based ```signature```.

To generate the ```signature``` please follow these steps:

- Sort the following parameters alphabetically:
	- ```action```
	- ```client_id```
	- ```timestamp```
- Generate a string by concatenating values separated by a comma. The string should look like: *value1,value2,value3*.
- Apply a hmac hashing function on the string using the algorithm ```sha256``` and your partner ```client_secret```  (available in your [Withings partner dashboard](https://developer.withings.com/dashboard/)) as a secret key.
- Add the hash string in the parameters under the key ```signature```

## Query parameters

- `action` string, required
- `client_id` string, required
- `timestamp` integer, required
- `signature` string, 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.
    - `nonce` string: A random timestamp based token to be used once in requiring signature API services to avoid replay attack

---

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