Skip to content

How to get access/refresh tokens #24

@dinaco

Description

@dinaco

Hey guys,

I am pretty new at this and I manage to get the fitbit icons displayed in my MM app, but they are all zerod out.

I checked getData.py and its telling me that my access token is invalid, which I never actually changed from tokens.ini file:

[Tokens]
acc_tok =
ref_tok =

My credentials.ini file is OK, got my client_id and client_secret set up.

This is what i get when running getData.py:

pi@raspberrypi:~/MagicMirror/modules/MMM-fitbit/python $ sudo python getData.py{"message": "credentials.ini exists", "type": "status"}
{"message": "Reading from credentials.ini", "type": "status"}
{"message": "Read of credentials.ini successful.", "type": "status"}
{"message": "credentials.ini exists", "type": "status"}
{"message": "Reading from credentials.ini", "type": "status"}
{"message": "Read of credentials.ini successful.", "type": "status"}
{"message": "tokens.ini exists", "type": "status"}
{"message": "Reading from tokens.ini", "type": "status"}
{"message": "Read of tokens.ini successful.", "type": "status"}
{"message": "Making API call", "type": "status"}
{"message": {"401": {"errors": [{"message": "Access token invalid: . Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.", "errorType": "invalid_token"}], "success": false}}, "type": "error"}
{"message": "Invalid token, reauthorise fitbit API", "type": "status"}

No idea where to get these tokens from.

Any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions