Add your Spotify / Streaming Account to the Pi Musicbox in a Secure Way With Device Passwords

In a recent article I wrote about the old Raspberry Pi, which serves its duty as my daily Web radio. The Pi MusicBox natively supports a bunch of streaming services, which improves the experience if you already have a streaming account, by providing your custom playlists on any HDMI capable hifi system. Unfortunately, the passwords are stored in plaintext, which is not a recommended practice for sensitive information. Especially if you use your Facebook credentials for services such as Spotify.

Most streaming services offer device passwords, which are restricted accounts where you can assign a dedicated username and password. Having separate credentials in the form of API keys for your devices is good practices, as it does not allow a thief to get hold of your actual account password, but only read access to your playlists. Also Spotify provides device passwords, but at the time of writing of this article, the assignment of new passwords simply did not work. A little googling revealed that the only possible way at the moment is using Facebook and its device passwords for the service. As Spotify uses Facebooks Authentication service, the services can exchange information about authorized users.

In the Settings, go to the Security panel and create a new password for apps. Name the app accordingly and provide a unique password.

Facebook security centerThen, open the Pi MusicBox interface and add the Emailaddress you registered with facebook and provide the newly created app password.

Musicbox StreamsYou can then enjoy your playlists in a secure way. You will receive a warning about the connection, which is an indicator that it worked.

4 thoughts on “Add your Spotify / Streaming Account to the Pi Musicbox in a Secure Way With Device Passwords

  1. Im trying to get spotify working for 2 weeks now. Did Spotify change something with the API?
    I also tried to connect via Mopify, but after sending my login data, i got an error message in that same window:

    “Something went wrong…
    Looks like Spotify didn’t return the correct tokens. Please close this window and refresh Mopify.
    invalid_grant: Invalid redirect URI”

    Any Suggestions here?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.