You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to automatically close the new window or tab that opens the authorization from fitbit
threading.Timer(1, webbrowser.open, args=(url,)).start()
I would like to close the browser after cherrypy.quickstart(self) to close the window or tab
The text was updated successfully, but these errors were encountered:
@brandonmichaelhunter I don't think it is possible with webbrowser.open but it may be possible using something like cefpython this is a great task for a community member to contribute. A PR would be most welcome
This really should be an option, although it would mean switching from webbrowser to a more flexible module like Selenium if I'm not mistaken.
It is a bit hard to read, but if you dive into api.py there's actually a bit of a workaround through trying to use old access & refresh tokens. For example, I download my sleep log daily and use the following code to try the old tokens and refresh them if they don't' work.
Note: the expires_at that is returned is a Unix Timestamp, but the fitbit wrapper only accepts integer values.
Also the default expiry time of the token is pretty short so it isn't all too useful anyways. I modified the API to pass the expires_in parameter to the authorization page, but didn't see any change in the final expiry date :(
Edit for like the billionth time: Looks like this wrapper uses the Authorization code grant flow, not the implicit flow, so the expires_in paramter can't be used. Guess I'll have to figure out how to use the refresher.
Is there a way to automatically close the new window or tab that opens the authorization from fitbit
threading.Timer(1, webbrowser.open, args=(url,)).start()
I would like to close the browser after cherrypy.quickstart(self) to close the window or tab
The text was updated successfully, but these errors were encountered: