I am having the same issue Greppie had at some point.
Next thing is, that setupAccess.py doesnt work or I did not understood how it does. The script start a server at port 8080 but if fitbit redirects to it I get an error that the page is not accessible. However I copied the token from url an put it into tokens.ini. There’s only an access token and no refresh token, right?
I am having this same problem, I get a 404 error on the attempt to get my tokens. I was able to pull the token from the URL, but have no way to get the refresh. Please help, im so close! Thanks for all of your effort.
When I click the autogenerated authorization URL, I am redirected to http://127.0.0.1:8080/ and throw this 404 error.
404 Not Found
Missing parameters: state
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/cherrypy/_cprequest.py”, line 670, in respond
response.body = self.handler()
File “/usr/local/lib/python2.7/dist-packages/cherrypy/lib/encoding.py”, line 217, in call
self.body = self.oldhandler(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py”, line 67, in call
raise sys.exc_info()[1]
HTTPError: (404, ‘Missing parameters: state’)
This is what I see when I run setupAccess.py
Is this part normal?
CherryPy Checker:
The Application mounted at ‘’ has an empty config.
Full output:
pi@mirror:~/MagicMirror/modules/MMM-fitbit/python $ sudo python setupAccess.py
Get credentials from credentials.ini? (Y/N)
n
Would you like to enter them manually now? (Y/N)
y
Enter client id:
227WT7
Enter client secret:
9fe3da42b609603a67e7730aad3ca96a
[25/Oct/2016:11:20:26] ENGINE Listening for SIGHUP.
[25/Oct/2016:11:20:26] ENGINE Listening for SIGTERM.
[25/Oct/2016:11:20:26] ENGINE Listening for SIGUSR1.
[25/Oct/2016:11:20:26] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at ‘’ has an empty config.
[25/Oct/2016:11:20:26] ENGINE Started monitor thread ‘Autoreloader’.
[25/Oct/2016:11:20:26] ENGINE Started monitor thread ‘_TimeoutMonitor’.
[25/Oct/2016:11:20:27] ENGINE Serving on http://127.0.0.1:8080
[25/Oct/2016:11:20:27] ENGINE Bus STARTED
127.0.0.1 - - [25/Oct/2016:11:20:40] “GET / HTTP/1.1” 404 1206 “” “Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.91 Safari/537.36”