Read the statement by Michael Teeuw here.
MMM-Strava
-
@hattlegr said in MMM-Strava:
I am not sure where to get a valid “web address” and “call back domain “ from to complete the API Application on the strava site To obtain my client ID and client secret numbers
On your personal Strava API website (strava.com/settings/api), you need to set a “callback domain” for your project. What did you set?
-
@lavolp3 I am not sure how to setup a call back domain.
-
@hattlegr You need to create an application in your strava account to use this module. Have you done that?
- Go to www.strava.com/settings/api
- Create an application. As far as I understand the only really important value is the callback domain. I GUESS (!!) this would need to be http://localhost OR the hostname (or IP) of your magicmirror, something like http://magicmirror
- Then you get a client secret and access token, which you need for the further procedure.
-
@lavolp3 said in MMM-Strava:
@hattlegr You need to create an application in your strava account to use this module. Have you done that?
- Go to www.strava.com/settings/api
- Create an application. As far as I understand the only really important value is the callback domain. I GUESS (!!) this would need to be http://localhost OR the hostname (or IP) of your magicmirror, something like http://magicmirror
- Then you get a client secret and access token, which you need for the further procedure.
The easiest way to authorise the module is
-
On the My API Application page update the application by entering
localhost
as the callback domain. -
Once the Strava API application is updated, copy the
client id
andclient secret
from the same page, then use these to update the module configuration in theconfig.js
file and restart the Magic Mirror. -
Finally, on the Pi itself, browse to http://localhost:8080/MMM-Strava/auth/ and follow the steps.
If it helps, here are the settings I’ve been using to test the module:
-
@ianperrin The description above is very good and I have successfully got through this process.
I have added my new Client ID and Client-secret to the config file.
When I run my magicmirror I am asked to follow link to strava/auth.
I am able to select the module and click the authorize button. This brings me to an the authorize page with the three check boxes as described, when I click on the authorize button it brings me to the Stava login page. I am able to login, but the screen takes me to my dashboard page. with no home / back / close buttons. (it replaces the MM page). So I can’t get out of this stage.Out of interest, I tried opening a browser using localhost:8080 once MM is running and get the same screen. When I click on the authorize button in the browser environment the process works fine and I am eventually taken back to the MM page and the strava data is working. However, when I shut down and star again the authorization is forgotten.
-
@hattlegr okay so we’re making progress. What is the output in the log file or the debug console in the browser? Once you’ve authorised the module, was a
tokens.json
file created in the MMM-Strava module folder? -
@ianperrin No, there is no file called tokens.json
-
@hattlegr how about the logs or debug console?
-
@ianperrin Sorry, I can’t find any logs or sure what a debug console is.
-
@hattlegr okay, so the Magic Mirror creates logs in two places.
-
On the Pi itself. If you use
pm2
to start your mirror, these can be viewed by runningpm2 logs mm
-
In the browser console. These can be viewed in the browser’s Developer Tools (usually activated by CTRL-SHIFT-i).
Let us know what you find.
-