oauth2

OAuth 2.0 - Request Access and Refresh Tokens

Use this endpoint to request an access token and refresh token from an authorization code or refresh an existing access token.<br><br> <span class='oauth2-request-token-notes'> Important: Don't forget to save the userid included in the response in your database.<br><br> Note: You can use this webservice either by signing the call or using the secret. Toggle the request body schema to see the parameters for the 2 options.<br><br> Note: Toggle the grant_type to see the different parameters that must be used depending if you're refreshing a token or using an authorization code. </span>

posthttps://wbsapi.withings.net/v2/oauth2

Request

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

Request body Using client secret

actionstring

Must take the value requesttoken.

Response

(Click to unfold)

statusinteger

Response status. See <a href='#tag/response_status'>Status</a> section for details.

Example response

{
  "body": {
    "userid": 363,
    "access_token": "a075f8c14fb8df40b08ebc8508533dc332a6910a",
    "refresh_token": "f631236f02b991810feb774765b6ae8e6c6839ca",
    "expires_in": 10800,
    "scope": "user.info,user.metrics",
    "csrf_token": "PACnnxwHTaBQOzF7bQqwFUUotIuvtzSM",
    "token_type": "Bearer"
  }
}

Changes

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