question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Access token doesn't get refreshed for Withings

See original GitHub issue

Describe the bug After 3 hours of creating a new connection to Withings, requests start to fail with the following error:

{ status: 401, body: {}, error: 'XRequestID: Not provided invalid_token: The access token provided is invalid' }

Debugging by printing tokens with the expression below hows that the tokens never change, including after the 3 hour period:

console.log(this.withings.$auth);

The only way to fix the integration is to create a new connection to Withings (which then works for the next 3 hours).

To Reproduce Steps to reproduce the behavior:

  1. Create a new Withings connection
  2. Create a Workflow and get it to fetch measures normally (eg. with a 15m timer)
  3. Wait 3 hours and see the failure in logs.

Expected behavior Workflows should keep working indefinitely (with the access token getting refreshed).

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS 12.16
  • Browser [e.g. chrome, safari] Arc (Chromium)
  • Version [e.g. 22] 0.72.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
edusteinhorstcommented, Dec 23, 2022

@dannyroosevelt just to give you some feedback: everything seems to be running smoothly 👍

1reaction
DilanAthukoralacommented, Oct 25, 2022

@edusteinhorst Thank you for reporting this issue, I am able to recreate the error with the given steps. The following error can be seen in the logs, 3 hours after connecting the app, when trying to fetch events. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BREAKING] Shutting down access and refresh tokens ...
No. The url to get the authentication code remains unchanged. See documentation. https://account.withings.com/oauth2_user/authorize2 · https://account ...
Read more >
OAuth2 token refreshing - Questions - n8n community
Hello, I'm trying to access the Withings API using the HTTPRequest node. ... token refreshing: I reliably get an access- and refresh token, ......
Read more >
new Withings token refresh endpoint breaks OAuthSwift #663
This breaks OAuthSwift. The parameters it sends when getting or renewing an access token are wrong, and so Withings responds with an error....
Read more >
Solved: Withings integration is not working - Fitbit Community
Unable to authenticate Withings user. Withings server returned the following error: Exception receiving access token. Best Answer.
Read more >
Refresh token is invalid after over 24hrs - Help - Intuit
What this means is that, if a user of our app does not use the app for 1 day or more, they need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found