MMM-fitbit icon indicating copy to clipboard operation
MMM-fitbit copied to clipboard

getData.py fails with invalid tokens every few days

Open pyrosmiley opened this issue 7 years ago • 2 comments

Hi, I'm not sure if this is an issue with the fitbit API (I've been having some trouble with it on something else I'm working on also!) but the API call to get data is is coming back unsuccessful, saying that the refresh token is invalid?

Re-authorizing via setupAccess.py will fix the issue, and it'll run just fine for a couple of days, but then it fails out again -- it's almost as if the module isn't storing a refresh token at some point.

pyrosmiley avatar Oct 12 '17 06:10 pyrosmiley

Hey, is this still an issue for you? I had the same problem, so what I ended up doing was run a script every night at 2AM that stops Magic Mirror, gets the new credentials, and then restarts Magic Mirror. I can post that script for you if you'd like?

dherl0623 avatar May 17 '18 12:05 dherl0623

@dherl0623 Wow I really appreciate it! That's very kind of you, and you may still want to for anyone else having issues. I actually ended up doing something similar, but I never set the script to auto-run. Since then, my fitbit unfortunately broke so I'm not really using it anymore.

pyrosmiley avatar May 24 '18 03:05 pyrosmiley