MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-NowPlayingOnSpotify: surviving Spotify's 6-month refresh-token expiry (a maintained fork)

    Scheduled Pinned Locked Moved Showcase
    13 Posts 6 Posters 2.1k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      motdog @rkorell
      last edited by

      @rkorell I am getting the error on the mirror to authorize. When I log into spotify to validate I get a client id Invalid. I created a new developer app thinking my existing one was no good. Any suggestions. I copied the loopback address as suggested

      M 1 Reply Last reply
      Reply Quote 0
      • M
        motdog @motdog
        last edited by

        I have opened powershell on my laptop and connected to the pi. when I go to http://127.0.0.1:8888 on that laptop I cant connect. If I enter that address directly on the pi, I get the client error when I log in

        S 1 Reply Last reply
        Reply Quote 0
        • S
          sdetweil @motdog
          last edited by

          @motdog said:

          http://127.0.0.1:8888 on that laptop I cant connect

          yes, the address is only live for a few seconds during the actual authentication sequence. (if the app actually enables the callback reception)
          otherwise it opens a browser and puts the url and data in the address field, for the user to manually copy the data (usually an access token)

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply
          Reply Quote 0
          • M
            motdog @sdetweil
            last edited by

            @sdetweil said:

            @motdog said:

            http://127.0.0.1:8888 on that laptop I cant connect

            yes, the address is only live for a few seconds during the actual authentication sequence. (if the app actually enables the callback reception)
            otherwise it opens a browser and puts the url and data in the address field, for the user to manually copy the data (usually an access token)

            So I was able to get to the page where it says the project needs to be authenticated and to login to spotify. when I do that, I get the invalid client id error. I tried both using the SSH method and via the chromium browser on the pi.

            Looked on the developer forum and didnt really see anything to help.

            R 1 Reply Last reply
            Reply Quote 0
            • R
              rkorell Module Developer @motdog
              last edited by rkorell

              @motdog Good afternoon.
              Sorry for late response - was heavily busy.

              Spotify recently changed again something in their API and their handling of tokens.

              That’s the reason why I changed to Tidal recently and created a new module for my purposes (show what’s playing on my Volumio (which recently WAS Spotify - so used the given (and even forked) Spotify Module)).

              But I gave up. Spotify is not longer a use-case for me - neither for my Volumio nor for My MagicMirror.
              I’m really sorry for that - I do not have time to step after every bad idea from spotify.
              If they lock their environment that massive - I’m out.

              At least from my (older) experience the “Application” handshake “should” work - it was an error in the callback-URL in most cases I have in mind …

              Sorry again for not being that helpful!

              Warmest regards and good luck!
              Ralf

              1 Reply Last reply
              Reply Quote 0
              • E
                eddiebrok @rkorell
                last edited by eddiebrok

                @rkorell I like the idea of showing the album cover along with the song. Music and artwork go hand in hand, and I’ve seen people have fun making alternate covers for albums too. Free brat generator can be pretty useful for experimenting with that kind of music artwork.

                R 2 Replies Last reply
                Reply Quote 0
                • R
                  rkorell Module Developer @eddiebrok
                  last edited by

                  @eddiebrok Yes, you’re absolutely right.
                  That’s the reason why I’ve used a module like that from the beginning of my implementation.
                  As stated above my use case at home is mainly a Volumio instance and for whatever reason this collides with Spotify’s “ideas” of Digital Rights Management.
                  So I switched to Tidal (which is supported by Volumio in another path)

                  This results in another way gathering information on “what is played currently” and for now I’m even able to display some artist background information (which currently IS implemented) and (currently only on Volumio’s screen) - lyrics and additional cover-views.

                  Warm regards,
                  Ralf

                  1 Reply Last reply
                  Reply Quote 0
                  • R
                    rkorell Module Developer @eddiebrok
                    last edited by

                    @eddiebrok OK, seen that you’ve edited your posting and empasizes the “free brat generator”.
                    Overseen this but this is far away from my use case :-)

                    Warm regards,
                    Ralf

                    1 Reply Last reply
                    Reply Quote 0
                    • R
                      raazalghul
                      last edited by

                      @rkorell

                      Thanks for making this module.
                      I am running into a continuous issue after setting it up.

                      This module is getting rate limited for some reason after some time.
                      I do not have this API and credentials set up for any other app as this is the only app I have it setup for so ther cannot be any throttling.

                      I have noticed the DOM updates every 1 second. Could that be causing it?

                      The config.js code is below.

                      {
                          module: "MMM-NowPlayingOnSpotify",
                          position: "top_right",
                          updatesEvery: 5,
                          classes: "page1",
                          config: {
                              showCoverArt: true,
                              clientID: "XXXXXXXXXXXXXXXXXXXXXXXXXX",
                              clientSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
                              redirectURI: "http://127.0.0.1:8888/callback"
                          }
                      }
                      

                      The log from the pm2 logs MagicMirror is below:

                      [2026-09-07 19:01:23.238] [LOG]   [MMM-NowPlayingOnSpotify] [MMM-NowPlayingOnSpotify] Transient error, keeping last data: Rate limited by Spotify.
                      

                      image.jpeg

                      R 1 Reply Last reply
                      Reply Quote 0
                      • R
                        rkorell Module Developer @raazalghul
                        last edited by

                        Dear @raazalghul ,

                        first of all: sorry for the delay - I’m pretty busy these times.
                        As you can see above I’ve stopped to use ths module but
                        your detailed report made it easy to spot.

                        The culprit is the placement of updatesEvery in your config. It sits outside the config: {} block
                        (next to module, position, classes), so MagicMirror never passes it to the module. The value is
                        silently ignored and the module falls back to its default of 1 second — so despite updatesEvery: 5
                        it’s actually polling the Spotify API once per second (~3,600 calls/hour), which is what
                        eventually trips Spotify’s rate limit.

                        Move the line one level down, into config:

                        {
                            module: "MMM-NowPlayingOnSpotify",
                            position: "top_right",
                            classes: "page1",
                            config: {
                                updatesEvery: 5,
                                showCoverArt: true,
                                clientID: "...",
                                clientSecret: "...",
                                redirectURI: "http://127.0.0.1:8888/callback"
                            }
                        },
                        

                        At 5 s that’s ~720 calls/hour, well within limits. Each poll cycle makes exactly one API request,
                        so the interval maps directly to your API rate. No update or code change needed.

                        This should resolve your problem.
                        Have fun!

                        Warm regards,
                        Ralf

                        1 Reply Last reply
                        Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy