A modern, multi-user web application that replicates the "Friend Activity" sidebar from the Spotify desktop client, making it accessible on any web browser.
- View Friend Activity: See what your friends are listening to in near real-time.
- Modern UI: Clean, responsive glassmorphism-inspired design
- Light & Dark Modes: A theme toggle that respects user's OS preference and saves their choice.
- Secure & Private: Your
sp_dccookie is stored only in your browser's local storage and is never saved on the server. - Easy Deployment: One-click deployment to Render using the included
render.yamlblueprint.
You can deploy your own version to see it live! spotifrenspy.onrender.com
To run this project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/Optimuspime123/spotifrenspy.git cd spotify-activity-viewer -
Create and activate a virtual environment:
- On macOS/Linux:
python3 -m venv venv source venv/bin/activate - On Windows:
python -m venv venv .\venv\Scripts\activate
- On macOS/Linux:
-
Install the dependencies:
pip install -r requirements.txt
-
Run the Flask development server:
python app.py
-
Open your browser and navigate to
http://127.0.0.1:5001.
This project is pre-configured for easy deployment on Render using the render.yaml file.
- Push your code to a GitHub repository.
- Go to the Render Dashboard and create a New Web Service.
- Connect the GitHub repository you just created. (you can technically use this repo url as well)
- Render will automatically detect the
render.yamlfile and configure the service. - Click Create and wait for the deployment to finish. Your app will be live!
Because autoDeploy: yes is enabled, Render will automatically redeploy your app every time you push a new commit to your main branch.
The app requires a Spotify authentication token called sp_dc to fetch your friend activity.
The sp_dc cookie is a long-term authentication token that proves you are logged into Spotify. This site uses it to make an authorized request for your friend feed, just like the official app does. Your cookie is only stored in your own browser and is never saved on our server. It typically lasts for several months, or even up to a year.
Step 1: Log in to open.spotify.com in a desktop web browser (like Chrome, Firefox, or Edge).
Step 2: Get the cookie using one of these methods:
- Press F12 or Ctrl+Shift+I (Windows) / Cmd+Opt+I (Mac) to open Developer Tools.
- Go to the Application tab (in Chrome/Edge) or Storage tab (in Firefox).
- On the left sidebar, expand the "Cookies" section and select
https://open.spotify.com. - Find the cookie named
sp_dcin the list. - Double-click on its "Cookie Value" to select it, then copy the entire long string of text.
- Paste this value into the input box on the website.
- Install a trusted cookie editor extension (e.g., "Cookie Editor" for Chrome/Firefox).
- With the
open.spotify.comtab active, click the extension's icon in your toolbar. - Find the cookie named
sp_dcand copy its value.
This is a third-party project and is not affiliated with, endorsed, or sponsored by Spotify. The functionality relies on unofficial Spotify APIs which may change or break at any time without notice. Use at your own risk.
- Some special playlists (like Blends, and some Jam sessions) do not show on friend actiivty at all, if your friend is listening to these you will not see them on the list
- Dynamic playlists like "your top songs xxxx" will link to a global template playlist, not your friend's personalised one (idk)
- On repeat, however is currently personalised to your friend (again, idk)
This project is distributed under the MIT License. See the LICENSE file for more information.