We have created a custom method to exchange an OAuth 1.0 token/secret for an OAuth 2.0 user access and refresh token.
To do this, make an OAuth 2.0 request for each user. This is similar to the refresh token request. The refresh_token must be set to the user's OAuth 1.0a access token and access token secret concatenated with a colon. Make a
POST request to
https://account.withings.com/oauth2/token with the following parameters.
||Must take the value
||Your app ID. You can get this ID from your app page.|
||Your app secret. You can get this from your app page.|
||The user's OAuth 1.0 token and token secret concatenated with a colon.|
Important: This migration process should not be done more than once per user. This migration feature will be removed at some point end of 2017. Once your application has obtained OAuth 2.0 tokens, it should start using the OAuth 2.0 refresh token flow.
An example request might look like:
https://account.withings.com/oauth2/token? grant_type=refresh_token& client_id=12345& client_secret=6789abcd& refresh_token=9b649614278c5d7563e9cefbfc7cd5c9eb25591292d843027e434e5007b2:e3d8cce46780605ed87d110b7677d345867c067d4d87bc58ebe4bfe6107b