Read the statement by Michael Teeuw here.
Missing token.json issue in MMM-Spotify
-
Firstly, my screen is not touch screen. I just need this module to display the songs currently being played on spotify. Will it work only for display?
After installing the module successfully and configuring, spotify.config.json with the client id and client secret, the module is not working. The spotify image appears on the screen but nothing else.
While trying to debug, After running npm start , the error shown is token.json file missing.[SPOTIFY - xxxxxgrxqe4xps01xxxxxxx] Token file not found! /home/pi/MagicMirror/modules/MMM-Spotify/USERNAME_token.json
[15.05.2023 08:09.37.724] [ERROR] [SPOTIFY - xxxxxxps01uyt6kxxxxxx] Token error! ./USERNAME_token.json ( (I entered the random chars of USERNAME))When i checked the module folder, I could not find the token.json file in MMM-Spotify folder. Does it get generated automatically when the code runs?
I have two queries. on the spotify.config.json file that needs to be configured prior to running MMM-Spotify.
[
{
“USERNAME”: “A_NAME_TO_IDENTIFY_YOUR_ACCOUNT”,
“CLIENT_ID”: “PUT_YOUR_SPOTIFY_APP_CLIENT_ID”,
“CLIENT_SECRET”: “PUT_YOUR_SPOTIFY_APP_CLIENT_SECRET”,
“TOKEN”: “./USERNAME_token.json”
}
]Is the USERNAME required to be the one on spotify account? Can the name be anything else? (my username in spotify is some random characters, can it be replaced with display name or email account)
In the “TOKEN” config line is the “./USERNAME to be replaced with the username mentioned above or has it to be left as it is? (”./USERNAME_token.json")I have raised an isue in the Github repo.
Thanks -
@sdetweil OOPS !!!
I missed doing the auth step. It works now Sir.
What does this Forum do without you. Thanks for all you help.
Just to answer my own questions;
Yes this works in screens without touch, and displays the song currently being played.- The username can be any name you want.
- In the “TOKEN” config line you can replace the name used as Username.
Thanks Sam, once again for this,
-
@Rags did you run the auth pgm as part of the install? it creates the token.json file
-
@sdetweil OOPS !!!
I missed doing the auth step. It works now Sir.
What does this Forum do without you. Thanks for all you help.
Just to answer my own questions;
Yes this works in screens without touch, and displays the song currently being played.- The username can be any name you want.
- In the “TOKEN” config line you can replace the name used as Username.
Thanks Sam, once again for this,
-
@Rags I don’t know how most of the modules work, but install and update is a consistent thing.
and checking for errors.
and I’m a geek… so all this is fun
-
I entered the first-auth.js. However, I kept on getting error in my authentication.
-
@Capt-Jib and what is the error?