{"id":22222348,"url":"https://github.com/misiektoja/spotify_profile_monitor","last_synced_at":"2026-02-23T02:49:17.880Z","repository":{"id":239327125,"uuid":"798860879","full_name":"misiektoja/spotify_profile_monitor","owner":"misiektoja","description":"Track Spotify profile, follower and playlist changes in real time","archived":false,"fork":false,"pushed_at":"2026-02-02T00:52:03.000Z","size":6798,"stargazers_count":46,"open_issues_count":3,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-02T05:41:00.719Z","etag":null,"topics":["osint","python","spotify","spotify-api","spotify-profile-monitor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misiektoja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-10T16:16:47.000Z","updated_at":"2026-02-02T00:52:06.000Z","dependencies_parsed_at":"2024-06-02T22:50:57.600Z","dependency_job_id":"1f906d11-1079-4972-8e72-53fd4bc7b9a1","html_url":"https://github.com/misiektoja/spotify_profile_monitor","commit_stats":null,"previous_names":["misiektoja/spotify_profile_monitor"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/misiektoja/spotify_profile_monitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fspotify_profile_monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fspotify_profile_monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fspotify_profile_monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fspotify_profile_monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misiektoja","download_url":"https://codeload.github.com/misiektoja/spotify_profile_monitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fspotify_profile_monitor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["osint","python","spotify","spotify-api","spotify-profile-monitor"],"created_at":"2024-12-02T23:18:04.790Z","updated_at":"2026-02-23T02:49:17.862Z","avatar_url":"https://github.com/misiektoja.png","language":"Python","funding_links":[],"categories":["[↑](#-table-of-contents) Music Streaming Services"],"sub_categories":["[↑](#-table-of-contents) GitHub"],"readme":"# spotify_profile_monitor\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/misiektoja/spotify_profile_monitor?style=flat-square\u0026color=blue\" alt=\"GitHub Release\" /\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/v/spotify_profile_monitor?style=flat-square\u0026color=teal\" alt=\"PyPI Version\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/misiektoja/spotify_profile_monitor?style=flat-square\u0026color=magenta\" alt=\"GitHub Stars\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.6+-blueviolet?style=flat-square\" alt=\"Python Versions\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/misiektoja/spotify_profile_monitor?style=flat-square\u0026color=blue\" alt=\"License\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/misiektoja/spotify_profile_monitor?style=flat-square\u0026color=green\" alt=\"Last Commit\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/maintenance-active-brightgreen?style=flat-square\" alt=\"Maintenance\" /\u003e\n\u003c/p\u003e\n\nPowerful Spotify tool for real-time tracking of profile changes, playlist updates, follower growth, collaborators and more - delivered straight to your terminal or inbox.\n\n### 🚀 Quick Install\n```sh\npip install spotify_profile_monitor\n```\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor.png\" alt=\"spotify_profile_monitor_screenshot\" width=\"90%\"/\u003e\n\u003c/p\u003e\n\n\u003ca id=\"features\"\u003e\u003c/a\u003e\n## Features\n\n### 👤 Profile Monitoring\n- **Real-time tracking**: Monitor Spotify user activities and profile changes.\n- **Social Network**: Detect addition/removal of **followings** and **followers**.\n- **Identity Changes**: Track **profile picture** and **username** changes.\n\n### 📜 Playlist Tracking\n- **Content Updates**: Monitor addition/removal of **tracks in playlists**.\n- **Collaborator Info**: Identify who added which track in **collaborative playlists**.\n- **Social Proof**: Monitor **likes** and **collaborators** count for playlists.\n- **Metadata**: Track **name** and **description** changes.\n\n### 📊 Advanced Tools\n- **Deep Insights**: Display detailed info about users, followers and followings.\n- **Historical Data**: View **recently played artists** and **search for users** by name.\n- **Export Power**: Display and export tracks from any playlist (including **Liked Songs**).\n- **Global Search**: Instant links to **Spotify, YouTube Music, Apple Music, Tidal, lyrics** and more.\n\n### 🔔 Smart Interactions\n- **Instant Alerts**: Detailed **Email notifications** for all profile and playlist changes.\n- **Visual Reports**: Attach changed profile pictures directly to emails.\n- **Terminal Graphics**: Display profile pictures right in your terminal (via `imgcat`).\n\n### ⚙️ Power Features\n- **Auth Flexibility**: Hybrid support for `sp_dc` cookie, Desktop Client and OAuth.\n- **CSV Logging**: Save all changes with full timestamps to a CSV file.\n- **Flexible Config**: Support for files, dotenv and environment variables.\n- **Signal Control**: Manage the running script via system signals (`SIGHUP`, `USR1`, etc.).\n\n✨ If you want to track Spotify friends' music activity, check out another tool I developed: [spotify_monitor](https://github.com/misiektoja/spotify_monitor).\n\n🛠️ If you're looking for debug tools to get Spotify Web Player access tokens and extract secret keys: [click here](#debugging-tools)\n\n\u003ca id=\"table-of-contents\"\u003e\u003c/a\u003e\n## Table of Contents\n\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n   * [Install from PyPI](#install-from-pypi)\n   * [Manual Installation](#manual-installation)\n   * [Upgrading](#upgrading)\n3. [Quick Start](#quick-start)\n4. [Configuration](#configuration)\n   * [Configuration File](#configuration-file)\n   * [Spotify access token source](#spotify-access-token-source)\n      * [Spotify sp_dc Cookie](#spotify-sp_dc-cookie)\n      * [Spotify Desktop Client](#spotify-desktop-client)\n      * [Spotify OAuth App](#spotify-oauth-app)\n      * [Spotify OAuth User](#spotify-oauth-user)\n   * [How to Get a Friend's User URI ID](#how-to-get-a-friends-user-uri-id)\n   * [Spotify sha256 (optional)](#spotify-sha256-optional)\n   * [Time Zone](#time-zone)\n   * [SMTP Settings](#smtp-settings)\n   * [Storing Secrets](#storing-secrets)\n5. [Usage](#usage)\n   * [Monitoring Mode](#monitoring-mode)\n   * [Listing Mode](#listing-mode)\n   * [Email Notifications](#email-notifications)\n   * [CSV Export](#csv-export)\n   * [Detection of Changed Profile Pictures](#detection-of-changed-profile-pictures)\n   * [Displaying Images in Your Terminal](#displaying-images-in-your-terminal)\n   * [Playlist Blacklisting](#playlist-blacklisting)\n   * [Restricted Playlists (Spotify API 404)](#restricted-playlists-spotify-api-404)\n   * [Check Intervals](#check-intervals)\n   * [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix)\n   * [Coloring Log Output with GRC](#coloring-log-output-with-grc)\n6. [Debugging Tools](#debugging-tools)\n   * [Access Token Retrieval via sp_dc Cookie and TOTP](#access-token-retrieval-via-sp_dc-cookie-and-totp)\n   * [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles)\n7. [Change Log](#change-log)\n8. [Maintainers](#maintainers)\n9. [License](#license)\n\n\u003ca id=\"requirements\"\u003e\u003c/a\u003e\n## Requirements\n\n* Python 3.6 or higher\n* Libraries: `requests`, `python-dateutil`, `urllib3`, `pyotp`, `pytz`, `tzlocal`, `python-dotenv`, [Spotipy](https://github.com/spotipy-dev/spotipy), `wcwidth`\n\nTested on:\n\n* **macOS**: Ventura, Sonoma, Sequoia, Tahoe\n* **Linux**: Raspberry Pi OS (Bullseye, Bookworm, Trixie), Ubuntu 24/25, Rocky Linux 8.x/9.x, Kali Linux 2024/2025\n* **Windows**: 10, 11\n\nIt should work on other versions of macOS, Linux, Unix and Windows as well.\n\n\u003ca id=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\n\u003ca id=\"install-from-pypi\"\u003e\u003c/a\u003e\n### Install from PyPI\n\n```sh\npip install spotify_profile_monitor\n```\n\n\u003ca id=\"manual-installation\"\u003e\u003c/a\u003e\n### Manual Installation\n\nDownload the *[spotify_profile_monitor.py](https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/spotify_profile_monitor.py)* file to the desired location.\n\nInstall dependencies via pip:\n\n```sh\npip install requests python-dateutil urllib3 pyotp pytz tzlocal python-dotenv spotipy wcwidth\n```\n\nAlternatively, from the downloaded *[requirements.txt](https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/requirements.txt)*:\n\n```sh\npip install -r requirements.txt\n```\n\n\u003ca id=\"upgrading\"\u003e\u003c/a\u003e\n### Upgrading\n\nTo upgrade to the latest version when installed from PyPI:\n\n```sh\npip install spotify_profile_monitor -U\n```\n\nIf you installed manually, download the newest *[spotify_profile_monitor.py](https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/spotify_profile_monitor.py)* file to replace your existing installation.\n\n\u003ca id=\"quick-start\"\u003e\u003c/a\u003e\n## Quick Start\n\n- Grab your [Spotify sp_dc cookie](#spotify-sp_dc-cookie), set up [OAuth app credentials](#spotify-oauth-app) and track the `spotify_user_uri_id` profile changes (including playlists):\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -u \"your_sp_dc_cookie_value\" -r \"your_spotify_app_client_id:your_spotify_app_client_secret\"\n```\n\nOr if you installed [manually](#manual-installation):\n\n```sh\npython3 spotify_profile_monitor.py \u003cspotify_user_uri_id\u003e -u \"your_sp_dc_cookie_value\" -r \"your_spotify_app_client_id:your_spotify_app_client_secret\"\n```\n\nTo get the list of all supported command-line arguments / flags:\n\n```sh\nspotify_profile_monitor --help\n```\n\n\u003ca id=\"configuration\"\u003e\u003c/a\u003e\n## Configuration\n\n\u003ca id=\"configuration-file\"\u003e\u003c/a\u003e\n### Configuration File\n\nMost settings can be configured via command-line arguments.\n\nIf you want to have it stored persistently, generate a default config template and save it to a file named `spotify_profile_monitor.conf`:\n\n```sh\n# On macOS, Linux or Windows Command Prompt (cmd.exe)\nspotify_profile_monitor --generate-config \u003e spotify_profile_monitor.conf\n\n# On Windows PowerShell (recommended to avoid encoding issues)\nspotify_profile_monitor --generate-config spotify_profile_monitor.conf\n```\n\n\u003e **IMPORTANT**: On **Windows PowerShell**, using redirection (`\u003e`) can cause the file to be encoded in UTF-16, which will lead to \"null bytes\" errors when running the tool. It is highly recommended to provide the filename directly as an argument to `--generate-config` to ensure UTF-8 encoding.\n\nEdit the `spotify_profile_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).\n\n**New in v3.1:** The tool now uses a hybrid authentication approach. OAuth app credentials (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) are required for playlist and user information retrieval when using either `cookie` or `client` token source methods. See [Spotify OAuth App](#spotify-oauth-app) section for setup instructions.\n\n**New in v2.9:** The configuration file includes options to enable/disable music service URLs (Apple Music, YouTube Music, Amazon Music, Deezer, Tidal) and lyrics service URLs (Genius, AZLyrics, Tekstowo.pl, Musixmatch, Lyrics.com) in console and email outputs.\n\n\u003ca id=\"spotify-access-token-source\"\u003e\u003c/a\u003e\n### Spotify access token source\n\nThe tool supports four methods for obtaining a Spotify access token.\n\nWhen you decide to use the `cookie` or `client` token source method, the tool uses a **hybrid authentication approach** and you also need to configure **OAuth app credentials** (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) for playlist and user information retrieval as described in [Spotify OAuth App](#spotify-oauth-app).\n\nThe token source method can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.\n\n**Recommended: `cookie`**\n\nUses the `sp_dc` cookie to retrieve a token from the Spotify web endpoint. This method is easy to set up and supports all features except fetching the list of liked tracks for the account that owns the access token (due to recent Spotify token's scope restrictions).\n\nSince version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.\n\n\n**Alternative: `client`**\n\nUses captured credentials from the Spotify desktop client and a Protobuf-based login flow. It's more complex to set up, but supports all features. This method is intended for advanced users who want a long-lasting token with the broadest possible access.\n\nSince version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.\n\n**Safe fallback: `oauth_app`**\n\nRelies on the official Spotify Web API (Client Credentials OAuth flow). This method is easy to set up and safe to use, but has several limitations. The following features are **not** supported:\n- viewing the list of followers/followings\n- accessing the followings count (only the followers count is tracked; **post-Feb 2026**: followers count also not available)\n- getting the list of recently played artists\n- showing other users' playlists added to user profile (unless the user is a collaborator on a playlist owned by other user)\n- fetching the list of liked tracks for the account that owns the access token\n- searching for Spotify users by name\n\n\u003e ⚠️ **Breaking Change (February 11, 2026)**: Spotify is removing the `GET /users/{id}` endpoint. Using `oauth_app` alone to monitor users will no longer work after this date. Use `cookie` or `client` method instead.\n\n**Personal: `oauth_user`**\n\nDedicated to tracking the authenticated user's own account via the official Spotify Web API (Authorization Code OAuth flow). I personally use this mode to monitor changes to my own account - such as new or lost followers/followings, likes on my playlists or when a collaborator adds a new song. You can also use this mode to track other users.\n\nThis method is easy to set up and safe to use, but has several limitations.\n\nThe following features are **not** supported when monitoring **your own account**:\n- viewing the list of followers\n- viewing the complete list of followings (only followed artists are available; followed users are not included)\n- searching for Spotify users by name\n- **viewing follower count (post-Feb 2026)**\n\n**Note**: If you use `oauth_user` to monitor your own account, the tool will list all your playlists, including private ones.\n\nThe following features are **not** supported when monitoring **another user** in this mode:\n- viewing the list of followers/followings\n- accessing the followings count (only the followers count is tracked; **post-Feb 2026**: followers count also not available)\n- getting the list of recently played artists\n- showing other users' playlists added to user profile (unless the user is a collaborator on a playlist owned by other user)\n- searching for Spotify users by name\n\n\u003e ⚠️ **Breaking Change (February 11, 2026)**: Spotify is removing the `GET /users/{id}` endpoint. Using `oauth_user` to monitor **other users** will no longer work after this date. **Self-monitoring** remains fully functional. For monitoring others, use the `cookie` or `client` method instead.\n\n\u003e ⚠️ **Premium Required (March 9, 2026)**: Starting March 9, 2026, `oauth_user` mode will require the authorized user to have a Spotify Premium account.\n\nIf no method is specified, the tool defaults to the `cookie` method.\n\n**Important**: It is strongly recommended to use a separate Spotify account with this tool if you obtain access tokens via the `cookie` or `client` methods. These methods interact with internal, undocumented endpoints for many features (like retrieving a list of followers/followings, followings count or recently played artists). If you prefer to use your regular Spotify account, consider the `oauth_app` or `oauth_user` methods - while they have some limitations, the tool remains fully functional with them. That said, while I've never encountered any issues on my own accounts, I can't guarantee that Spotify won't impose restrictions in the future - you've been warned.\n\n\u003ca id=\"spotify-sp_dc-cookie\"\u003e\u003c/a\u003e\n#### Spotify sp_dc Cookie\n\nThis is the default method used to obtain a Spotify access token.\n\n- Log in to [https://open.spotify.com/](https://open.spotify.com/) in your web browser.\n\n- Locate and copy the value of the `sp_dc` cookie.\n   - Use your web browser's dev console or **Cookie-Editor** by cgagnier to extract it easily: [https://cookie-editor.com/](https://cookie-editor.com/)\n\n- Provide the `SP_DC_COOKIE` secret using one of the following methods:\n   - Pass it at runtime with `-u` / `--spotify-dc-cookie`\n   - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_DC_COOKIE=...`)\n   - Add it to [.env file](#storing-secrets) (`SP_DC_COOKIE=...`) for persistent use\n   - Fallback: hard-code it in the code or config file\n\nIf your `sp_dc` cookie expires, the tool will notify you via the console and email. In that case, you'll need to grab the new `sp_dc` cookie value.\n\nIf you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to reload the file with the new `sp_dc` cookie without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).\n\n\u003e **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days, that's why since v2.7 the tool fetches it from remote URL (see `SECRET_CIPHER_DICT_URL`); you can also run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles) for more info).\n\n\u003ca id=\"spotify-desktop-client\"\u003e\u003c/a\u003e\n#### Spotify Desktop Client\n\nThis is the alternative method used to obtain a Spotify access token which simulates a login from the real Spotify desktop app using credentials intercepted from a real session.\n\n- Run an intercepting proxy of your choice (like [Proxyman](https://proxyman.com) - the trial version is sufficient)\n\n- Enable SSL traffic decryption for `spotify.com` domain\n   - in Proxyman: click **Tools → SSL Proxying List → + button → Add Domain → paste `*.spotify.com` → Add**\n\n- Launch the Spotify desktop client, then switch to your intercepting proxy (like Proxyman) and look for POST requests to `https://login5.spotify.com/v3/login`\n\n- If you don't see this request, try following steps (stop once it works):\n   - restart the Spotify desktop client\n   - log out from the Spotify desktop client and log back in\n   - point Spotify at the intercepting proxy directly in its settings, i.e. in **Spotify → Settings → Proxy Settings**, set:\n      - **proxy type**: `HTTP`\n      - **host**: `127.0.0.1` (IP/FQDN of your proxy, for Proxyman use the IP you see at the top bar)\n      - **port**: `9090` (port of your proxy, for Proxyman use the port you see at the top bar)\n      - restart the app; since QUIC (HTTP/3) requires raw UDP and can't tunnel over HTTP CONNECT, Spotify will downgrade to TCP-only HTTP/2 or 1.1, which intercepting proxy can decrypt\n   -  block Spotify's UDP port 443 at the OS level with a firewall of your choice - this prevents QUIC (HTTP/3), forcing TLS over TCP and letting intercepting proxy perform MITM\n   - try an older version of the Spotify desktop client\n\n- Export the login request body (a binary Protobuf payload) to a file (e.g. ***login-request-body-file***)\n   - In Proxyman: **right click the request → Export → Request Body → Save File**.\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/proxyman_export_protobuf.png\" alt=\"proxyman_export_protobuf\" width=\"80%\"/\u003e\n\u003c/p\u003e\n\n- Run the tool with `--token-source client -w \u003cpath-to-login-request-body-file\u003e`:\n\n```sh\nspotify_profile_monitor --token-source client -w \u003cpath-to-login-request-body-file\u003e \u003cspotify_user_uri_id\u003e\n```\n\nIf successful, the tool will automatically extract the necessary fields and begin monitoring.\n\nInstead of using the `-w` flag each time, you can persist the Protobuf login request file path by setting the `LOGIN_REQUEST_BODY_FILE` configuration option.\n\nThe same applies to `--token-source client` flag - you can persist it via `TOKEN_SOURCE` configuration option set to `client`.\n\nThe tool will automatically refresh both the access token and client token using the intercepted refresh token.\n\nIf your refresh token expires, the tool will notify you via the console and email. In that case, you'll need to re-export the login request body.\n\nIf you re-export the login request body to the same file name, you can send a `SIGHUP` signal to reload the file with the new refresh token without restarting the tool. More info in [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).\n\nAdvanced options are available for further customization - refer to the configuration file comments. However, the default settings are suitable for most users and modifying other values is generally NOT recommended.\n\n\u003ca id=\"spotify-oauth-app\"\u003e\u003c/a\u003e\n#### Spotify OAuth App\n\nCan be used as a standalone mode, but also as a secondary mode to either a `cookie` or `client` token source method to retrieve playlist and user information (required due to restrictions introduced by Spotify on December 22, 2025).\n\nThis method uses an official Spotify Web API (Client Credentials OAuth flow).\n\nTo obtain the credentials:\n\n- Log in to [Spotify Developer dashboard](https://developer.spotify.com/dashboard)\n\n- Create a new app\n\n- For **Redirect URL**, use: `http://127.0.0.1:1234`\n   - The URL must match exactly as shown, including not having a `/` at the end\n   - When copying the link via right-click, some browsers may add an extra `/` to the URL\n\n- Select **Web API** as the intended API\n\n- Copy the **Client ID** and **Client Secret**\n\n- Provide the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` secrets using one of the following methods:\n   - Pass it at runtime with `-r` / `--oauth-app-creds` (use `SP_APP_CLIENT_ID:SP_APP_CLIENT_SECRET` format - note the colon separator)\n   - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_APP_CLIENT_ID=...; export SP_APP_CLIENT_SECRET=...`)\n   - Add it to [.env file](#storing-secrets) (`SP_APP_CLIENT_ID=...` and `SP_APP_CLIENT_SECRET=...`) for persistent use\n   - Fallback: hard-code it in the code or config file\n\nExample:\n\n```sh\nspotify_profile_monitor --token-source oauth_app -r \"your_spotify_app_client_id:your_spotify_app_client_secret\" \u003cspotify_user_uri_id\u003e\n```\n\nThe tool automatically refreshes the OAuth app access token, so it remains valid indefinitely. Tokens are cached in the file specified by `SP_APP_TOKENS_FILE` configuration option (default: `.spotify-profile-monitor-oauth-app.json`).\n\nIf you store the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` in a dotenv file you can update their values and send a `SIGHUP` signal to reload the file with the new secret values without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).\n\nYou can also use this method as a standalone token source (without `cookie` or `client`) by setting `TOKEN_SOURCE` to `oauth_app`, but this has several limitations as described in the [Spotify access token source](#spotify-access-token-source) section.\n\n\u003ca id=\"spotify-oauth-user\"\u003e\u003c/a\u003e\n#### Spotify OAuth User\n\nThis method uses an official Spotify Web API (Authorization Code OAuth flow).\n\n- Log in to Spotify Developer dashboard: https://developer.spotify.com/dashboard\n\n- Create a new app\n\n- For **Redirect URL**, use: http://127.0.0.1:1234\n   - The URL must match exactly as shown, including not having a / at the end\n   - When copying the link via right-click, some browsers may add an extra / to the URL\n\n- Select **Web API** as the intended API\n\n- Copy the **Client ID** and **Client Secret** (the secret is not required if you're using `PKCE` mode)\n\n- Provide the `SP_USER_CLIENT_ID` and `SP_USER_CLIENT_SECRET` secrets using one of the following methods:\n   - Pass it at runtime with `-n` / `--oauth-user-creds`\n      - Use `SP_USER_CLIENT_ID`:`SP_USER_CLIENT_SECRET` format - note the colon separator\n   - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_USER_CLIENT_ID=...; export SP_USER_CLIENT_SECRET=...`)\n   - Add it to [.env file](#storing-secrets) (`SP_USER_CLIENT_ID=...` and `SP_USER_CLIENT_SECRET=...`) for persistent use\n   - Fallback: hard-code it in the code or config file\n\nTo use `PKCE` mode, set SP_USER_CLIENT_SECRET to an empty string (\"\").\n\nYou can use the same client ID and secret values as those used for the [Spotify OAuth App](#spotify-oauth-app).\n\nExample:\n\n```sh\nspotify_profile_monitor --token-source oauth_user -n \"your_spotify_user_client_id:your_spotify_user_client_secret\" \u003cspotify_user_uri_id\u003e\n```\n\nThe tool takes care of refreshing the access token so it should remain valid indefinitely.\n\nIf you store the `SP_USER_CLIENT_ID` and `SP_USER_CLIENT_SECRET` in a dotenv file you can update their values and send a `SIGHUP` signal to reload the file with the new secret values without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).\n\n\u003ca id=\"how-to-get-a-friends-user-uri-id\"\u003e\u003c/a\u003e\n### How to Get a Friend's User URI ID\n\nThe easiest way is via the Spotify desktop or mobile client:\n- go to your friend's profile\n- click the **three dots** (•••) or press the **Share** button\n- copy the link to the profile\n\nYou'll get a URL like: [https://open.spotify.com/user/spotify_user_uri_id?si=tracking_id](https://open.spotify.com/user/spotify_user_uri_id?si=tracking_id)\n\nExtract the part between `/user/` and `?si=` - in this case: `spotify_user_uri_id`\n\nUse that as the user URI ID (`spotify_user_uri_id`) in the tool.\n\nAlternatively you can use the built-in functionality to search for usernames (`-s` flag) to get the user URI ID:\n\n```sh\nspotify_profile_monitor -s \"user name\"\n```\n\nIt will list all users with such names with their user URI ID.\n\nBefore using this feature make sure you followed the instructions [here](#spotify-sha256-optional).\n\n\u003ca id=\"spotify-sha256-optional\"\u003e\u003c/a\u003e\n### Spotify sha256 (optional)\n\nThis step is optional and only required if you want to use the feature that searches Spotify's catalog for users with a specific name to obtain their Spotify user URI ID (`-s` flag). To do this, you must intercept your Spotify client's network traffic and extract the required `sha256Hash` value.\n\n- Run an intercepting proxy of your choice (like [Proxyman](https://proxyman.com)).\n\n- Launch the Spotify desktop client and search for some user\n\n- Look for requests with the `searchUsers` or `searchDesktop` operation name\n\n- Display the details of one of these requests and copy the **sha256Hash** parameter value (string marked as `XXXXXXXXXX` below)\n\nExample request:\n`https://api-partner.spotify.com/pathfinder/v1/query?operationName=searchUsers\u0026variables={\"searchTerm\":\"spotify_user_uri_id\",\"offset\":0,\"limit\":5,\"numberOfTopResults\":5,\"includeAudiobooks\":false}\u0026extensions={\"persistedQuery\":{\"version\":1,\"sha256Hash\":\"XXXXXXXXXX\"}}`\n\n\n\n - Provide the `SP_SHA256` secret using one of the following methods:\n   - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_SHA256=...`)\n   - Add it to [.env file](#storing-secrets) (`SP_SHA256=...`) for persistent use\n   - Fallback: hard-code it in the code or config file\n\n\u003ca id=\"time-zone\"\u003e\u003c/a\u003e\n### Time Zone\n\nBy default, time zone is auto-detected using `tzlocal`. You can set it manually in `spotify_profile_monitor.conf`:\n\n```ini\nLOCAL_TIMEZONE='Europe/Warsaw'\n```\n\nYou can get the list of all time zones supported by pytz like this:\n\n```sh\npython3 -c \"import pytz; print('\\n'.join(pytz.all_timezones))\"\n```\n\n\u003ca id=\"smtp-settings\"\u003e\u003c/a\u003e\n### SMTP Settings\n\nIf you want to use email notifications functionality, configure SMTP settings in the `spotify_profile_monitor.conf` file.\n\nVerify your SMTP settings by using `--send-test-email` flag (the tool will try to send a test email notification):\n\n```sh\nspotify_profile_monitor --send-test-email\n```\n\n\u003ca id=\"storing-secrets\"\u003e\u003c/a\u003e\n### Storing Secrets\n\nIt is recommended to store secrets like `SP_DC_COOKIE`, `SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`, `SP_USER_CLIENT_ID`, `SP_USER_CLIENT_SECRET`, `REFRESH_TOKEN`, `SP_SHA256` or `SMTP_PASSWORD` as either an environment variable or in a dotenv file.\n\nSet the needed environment variables using `export` on **Linux/Unix/macOS/WSL** systems:\n\n```sh\nexport SP_DC_COOKIE=\"your_sp_dc_cookie_value\"\nexport SP_APP_CLIENT_ID=\"your_spotify_app_client_id\"\nexport SP_APP_CLIENT_SECRET=\"your_spotify_app_client_secret\"\nexport SP_USER_CLIENT_ID=\"your_spotify_user_client_id\"\nexport SP_USER_CLIENT_SECRET=\"your_spotify_user_client_secret\"\nexport REFRESH_TOKEN=\"your_spotify_app_refresh_token\"\nexport SP_SHA256=\"your_spotify_client_sha256\"\nexport SMTP_PASSWORD=\"your_smtp_password\"\n```\n\nOn **Windows Command Prompt** use `set` instead of `export` and on **Windows PowerShell** use `$env`.\n\nAlternatively store them persistently in a dotenv file (recommended):\n\n```ini\nSP_DC_COOKIE=\"your_sp_dc_cookie_value\"\nSP_APP_CLIENT_ID=\"your_spotify_app_client_id\"\nSP_APP_CLIENT_SECRET=\"your_spotify_app_client_secret\"\nSP_USER_CLIENT_ID=\"your_spotify_user_client_id\"\nSP_USER_CLIENT_SECRET=\"your_spotify_user_client_secret\"\nREFRESH_TOKEN=\"your_spotify_app_refresh_token\"\nSP_SHA256=\"your_spotify_client_sha256\"\nSMTP_PASSWORD=\"your_smtp_password\"\n```\n\nBy default the tool will auto-search for dotenv file named `.env` in current directory and then upward from it.\n\nYou can specify a custom file with `DOTENV_FILE` or `--env-file` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e --env-file /path/.env-spotify_profile_monitor\n```\n\n You can also disable `.env` auto-search with `DOTENV_FILE = \"none\"` or `--env-file none`:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e --env-file none\n```\n\nAs a fallback, you can also store secrets in the configuration file or source code.\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n\u003ca id=\"monitoring-mode\"\u003e\u003c/a\u003e\n### Monitoring Mode\n\nTo monitor specific user for all profile changes (including playlists), just type [Spotify user URI ID](#how-to-get-a-friends-user-uri-id) as a command-line argument (`spotify_user_uri_id` in the example below):\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e\n```\n\nIf you use the default method to obtain a Spotify access token (`cookie`) and have not set `SP_DC_COOKIE` secret, you can use `-u` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -u \"your_sp_dc_cookie_value\"\n```\n\n**Note:** OAuth app credentials are now required for playlist and user information retrieval. If you haven't set `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` via environment variables or `.env` file, you can use the `-r` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -u \"your_sp_dc_cookie_value\" -r \"your_spotify_app_client_id:your_spotify_app_client_secret\"\n```\n\nSee [Spotify OAuth App](#spotify-oauth-app) for detailed setup instructions.\n\nBy default, the tool looks for a configuration file named `spotify_profile_monitor.conf` in:\n - current directory\n - home directory (`~`)\n - script directory\n\n If you generated a configuration file as described in [Configuration](#configuration), but saved it under a different name or in a different directory, you can specify its location using the `--config-file` flag:\n\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e --config-file /path/spotify_profile_monitor_new.conf\n```\n\nBy default, only public playlists owned by the user are fetched. To change this behavior:\n- set `GET_ALL_PLAYLISTS` to `True`\n- or use the `-k` flag\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -k\n```\n\nIt is helpful in the case of playlists created by another user added to another user profile.\n\nSome users don't list all their public playlists on their profile, but if you know a playlist's URI, you can still monitor it.\n\nTo do so, add entries to the `ADD_PLAYLISTS_TO_MONITOR` configuration option. Example:\n\n```python\nADD_PLAYLISTS_TO_MONITOR = [\n    {'uri': 'spotify:playlist:{playlist_id1}', 'owner_name': '{user_id}', 'owner_uri': 'spotify:user:{user_id}'},\n    {'uri': 'spotify:playlist:{playlist_id2}', 'owner_name': '{user_id}', 'owner_uri': 'spotify:user:{user_id}'}\n]\n```\n\nReplace `{playlist_id1}` and `{playlist_id2}` with the playlists URI IDs you want to monitor and `{user_id}` with the owner's URI ID (`spotify_user_uri_id`).\n\nIf you want to completely disable detection of changes in user's public playlists (like added/removed tracks in playlists, playlists name and description changes, number of likes for playlists):\n- set `DETECT_CHANGES_IN_PLAYLISTS` to `False`\n- or use the `-q` flag\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -q\n```\n\nIf you want to skip some user's playlists from processing, you can use `PLAYLISTS_TO_SKIP_FILE` or `-t` flag (more info [here](#playlist-blacklisting))\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -t ignored_playlists\n```\n\nThe tool runs until interrupted (`Ctrl+C`). Use `tmux` or `screen` for persistence.\n\nYou can monitor multiple Spotify users by running multiple copies of the script.\n\nThe tool automatically saves its output to `spotify_profile_monitor_\u003cuser_uri_id/file_suffix\u003e.log` file. The log file name can be changed via `SP_LOGFILE` configuration option and its suffix via `FILE_SUFFIX` / `-y` flag. Logging can be disabled completely via `DISABLE_LOGGING` / `-d` flag.\n\nThe tool also saves the list of followings, followers and playlists to these files:\n- `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_followings.json`\n- `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_followers.json`\n- `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_playlists.json`\n\nThanks to this we can detect changes after the tool is restarted.\n\nThe tool also saves the user profile picture to `spotify_profile_{user_uri_id/file_suffix}_pic*.jpeg` files.\n\n\u003ca id=\"listing-mode\"\u003e\u003c/a\u003e\n### Listing Mode\n\nThere is also another mode of the tool which displays various requested information.\n\nIf you want to display details for a specific Spotify playlist URL (i.e. its name, description, number of tracks, likes, overall duration, creation and last update date, list of tracks with information on when they were added), then use the `-l` flag:\n\n```sh\nspotify_profile_monitor -l \"https://open.spotify.com/playlist/playlist_uri_id\"\n```\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor_playlist.png\" alt=\"spotify_profile_monitor_playlist\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\nIf you want to not only display, but also save the list of tracks for a specific Spotify playlist to a CSV file, use the `-l` flag with `-b` indicating the CSV file:\n\n```sh\nspotify_profile_monitor -l \"https://open.spotify.com/playlist/playlist_uri_id\" -b spotify_playlist_tracks.csv\n```\n\nIf you want to display similar information for **Liked Songs** playlist for the user owning the Spotify access token, use the `-x` flag (can also be used with `-b`):\n\n```sh\nspotify_profile_monitor -x\n```\n\nIf you want to export tracks from `-l` or `-x` for direct import into [spotify_monitor](https://github.com/misiektoja/spotify_monitor), use the `-o` flag to ensure appropriate formatting (optionally with `-b` to specify the text file where the tracks will be exported):\n\n```sh\nspotify_profile_monitor -o -x -b spotify_liked_tracks.txt\nspotify_profile_monitor -o -l \"https://open.spotify.com/playlist/playlist_uri_id\" -b spotify_playlist_tracks.txt\n```\n\nIf you want to display details for a specific Spotify user profile URL (i.e. user URI ID, list and number of followers and followings, recently played artists, list and number of user's playlists with basic statistics like when created, last updated, description, number of tracks and likes) then use the `-i` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -i\n```\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor_user_details.png\" alt=\"spotify_profile_monitor_user_details\" width=\"80%\"/\u003e\n\u003c/p\u003e\n\nBy default, only public playlists owned by the user are fetched. You can change this behavior with `-k` flag. It is helpful in the case of playlists created by another user added to another user profile:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -i -k\n```\n\nIf you want to additionally export each of the user's playlists into a separate .CSV file (named after the playlist and sanitized), use the `--export-all-playlists` flag (requires `pathvalidate` library):\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -i --export-all-playlists\n```\n\nIf you want to completely disable the processing of a user's public playlists while displaying details for a specific Spotify user profile URL (to speed up the process), you can use the `-q` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -i -q\n```\n\nIf you only want to display the list of followings and followers for the user (`-f` flag):\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -f\n```\n\nIf you want to display a list of recently played artists (this feature only works if the user has it enabled in their settings), use the `-a` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -a\n```\n\nIf you want to search the Spotify catalog for users with a specific name to obtain their Spotify user URI ID (`-s` flag):\n\n```sh\nspotify_profile_monitor -s \"user name\"\n```\n\n\u003ca id=\"email-notifications\"\u003e\u003c/a\u003e\n### Email Notifications\n\nTo enable email notifications for all user profile changes (including playlists):\n- set `PROFILE_NOTIFICATION` to `True`\n- or use the `-p` flag\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -p\n```\n\nTo disable sending an email about new followers/followings (these are sent by default when the `-p` flag is enabled):\n- set `FOLLOWERS_FOLLOWINGS_NOTIFICATION` to `False`\n- or use the `-g` flag\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -p -g\n```\n\nTo disable sending an email on errors (enabled by default):\n- set `ERROR_NOTIFICATION` to `False`\n- or use the `-e` flag\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -e\n```\n\nMake sure you defined your SMTP settings earlier (see [SMTP settings](#smtp-settings)).\n\nExample email:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor_email_notifications.png\" alt=\"spotify_profile_monitor_email_notifications\" width=\"90%\"/\u003e\n\u003c/p\u003e\n\n\u003ca id=\"csv-export\"\u003e\u003c/a\u003e\n### CSV Export\n\nIf you want to save all profile changes (including playlists) to a CSV file, set `CSV_FILE` or use `-b` flag:\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -b spotify_profile_changes_spotify_user.csv\n```\n\nThe file will be automatically created if it does not exist.\n\n\u003ca id=\"detection-of-changed-profile-pictures\"\u003e\u003c/a\u003e\n### Detection of Changed Profile Pictures\n\nThe tool can detect when a monitored user changes their profile picture. Notifications appear in the console and (if the `-p` flag is enabled) via email.\n\nThis feature is enabled by default. To disable it, either:\n\n- set the `DETECT_CHANGED_PROFILE_PIC` to `False`\n- or use the `-j` flag\n\n\u003ca id=\"how-it-works\"\u003e\u003c/a\u003e\n#### How It Works\n\nSince Spotify periodically changes the profile picture URL even when the image is the same, the tool performs a binary comparison of JPEG files to detect actual changes.\n\nOn the first run, it saves the current profile picture to `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_pic.jpeg`\n\nOn each subsequent check a new image is fetched and it is compared byte-for-byte with the saved image.\n\nIf a change is detected, the old picture is moved to `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_pic_old.jpeg` and the new one is saved to:\n- `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_pic.jpeg` (current)\n- `spotify_profile_\u003cuser_uri_id/file_suffix\u003e_pic_YYmmdd_HHMM.jpeg` (for history)\n\n\u003ca id=\"displaying-images-in-your-terminal\"\u003e\u003c/a\u003e\n### Displaying Images in Your Terminal\n\nIf you have `imgcat` installed, you can enable inline display of profile pictures and playlist artwork directly in your terminal.\n\nTo do this, set the path to your `imgcat` binary in the `IMGCAT_PATH` configuration option.\n\nIf you specify only the binary name, it will be auto-searched in your PATH.\n\nSet it to empty to disable this feature.\n\n\u003ca id=\"playlist-blacklisting\"\u003e\u003c/a\u003e\n### Playlist Blacklisting\n\nBy default, all Spotify-owned playlists are skipped from processing, i.e. the tool won't fetch or report changed tracks and the number of likes for them. This is because they are typically dynamically generated with a high volume of changes in terms of likes and sometimes tracks as well. You can change this behavior by setting `IGNORE_SPOTIFY_PLAYLISTS` to `False`.\n\nOn top of that, you can also use the `PLAYLISTS_TO_SKIP_FILE` / `-t` flag which allows you to indicate a file with additional playlists to be blacklisted.\n\nThe file may include lines referencing playlist URIs and URLs, as well as the playlist owner's name, URI and URL. Below is an example of an `ignored_playlists` file with acceptable entries:\n\n```sh\nplaylist_uri_id\nspotify:playlist:playlist_uri_id\nhttps://open.spotify.com/playlist/playlist_uri_id\nhttps://open.spotify.com/playlist/playlist_uri_id?si=1\nSome User Name\nuser_uri_id\nspotify:user:user_uri_id\nhttps://open.spotify.com/user/user_uri_id?si=1\n```\n\nYou can comment out specific lines with # if needed.\n\nIf certain playlists are blacklisted, there will be an appropriate message. For example:\n\n```\n- 'Afternoon Acoustic' [ IGNORED ]\n[ https://open.spotify.com/playlist/37i9dQZF1DX4E3UdUs7fUx?si=1 ]\n[ songs: 100, likes: 2164491, collaborators: 0 ]\n[ owner: Spotify ]\n[ date: Fri 23 Aug 2024, 17:05:15 - 7 months, 10 hours, 27 minutes ago ]\n[ update: Fri 23 Aug 2024, 17:05:15 - 7 months, 10 hours, 27 minutes ago ]\n'Unwind and let the afternoon unfold.'\n```\n\n\u003ca id=\"restricted-playlists-spotify-api-404\"\u003e\u003c/a\u003e\n### Restricted Playlists (Spotify API 404)\n\nSome playlists (especially Spotify-curated ones) may appear on profile pages, but return `404` on the public `/v1/playlists/{id}` endpoint.\n\nIn such cases, the tool marks them as `[ RESTRICTED ]` and falls back to profile-view metadata (`public_playlists`) instead of treating them as a generic processing error.\n\nFor restricted playlists, the tool can monitor:\n- added/removed from profile\n- playlist name changes\n- likes/followers count changes (when available in profile-view)\n\nFor restricted playlists, the tool cannot monitor:\n- track-level changes\n- collaborators\n- description changes\n- creation/last update timestamps derived from track history\n\n\u003ca id=\"check-intervals\"\u003e\u003c/a\u003e\n### Check Intervals\n\nIf you want to customize polling interval, use `-c` flag (or `SPOTIFY_CHECK_INTERVAL` configuration option):\n\n```sh\nspotify_profile_monitor \u003cspotify_user_uri_id\u003e -c 900\n```\n\n\u003ca id=\"signal-controls-macoslinuxunix\"\u003e\u003c/a\u003e\n### Signal Controls (macOS/Linux/Unix)\n\nThe tool has several signal handlers implemented which allow to change behavior of the tool without a need to restart it with new configuration options / flags.\n\nList of supported signals:\n\n| Signal | Description |\n| ----------- | ----------- |\n| USR1 | Toggle email notifications for user's profile changes (-p) |\n| TRAP | Increase the profile check timer (by 5 minutes) |\n| ABRT | Decrease the profile check timer (by 5 minutes) |\n| HUP | Reload secrets from .env file and token source credentials from Protobuf files |\n\nSend signals with `kill` or `pkill`, e.g.:\n\n```sh\npkill -USR1 -f \"spotify_profile_monitor \u003cspotify_user_uri_id\u003e\"\n```\n\nAs Windows supports limited number of signals, this functionality is available only on Linux/Unix/macOS.\n\n\u003ca id=\"coloring-log-output-with-grc\"\u003e\u003c/a\u003e\n### Coloring Log Output with GRC\n\nYou can use [GRC](https://github.com/garabik/grc) to color logs.\n\nAdd to your GRC config (`~/.grc/grc.conf`):\n\n```\n# monitoring log file\n.*_monitor_.*\\.log\nconf.monitor_logs\n```\n\nNow copy the [conf.monitor_logs](https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/grc/conf.monitor_logs) to your `~/.grc/` and log files should be nicely colored when using `grc` tool.\n\nExample:\n\n```sh\ngrc tail -F -n 100 spotify_profile_monitor_\u003cuser_uri_id/file_suffix\u003e.log\n```\n\n\u003ca id=\"debugging-tools\"\u003e\u003c/a\u003e\n## Debugging Tools\n\nTo help with troubleshooting and development, two debug utilities are available in the [debug](https://github.com/misiektoja/spotify_monitor/tree/dev/debug) directory of the related [spotify_monitor](https://github.com/misiektoja/spotify_monitor) project.\n\n\u003ca id=\"access-token-retrieval-via-sp_dc-cookie-and-totp\"\u003e\u003c/a\u003e\n### Access Token Retrieval via sp_dc Cookie and TOTP\n\nThe [spotify_monitor_totp_test](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_totp_test.py) tool retrieves a Spotify access token using a Web Player `sp_dc` cookie and TOTP parameters.\n\nDownload from [here](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_totp_test.py) or:\n\n```sh\nwget https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/dev/debug/spotify_monitor_totp_test.py\n```\n\nInstall requirements:\n\n```sh\npip install requests python-dateutil pyotp\n```\n\nRun:\n\n```sh\npython3 spotify_monitor_totp_test.py --sp-dc \"your_sp_dc_cookie_value\"\n```\n\nYou should get a valid Spotify access token, example output:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_totp_test.png\" alt=\"spotify_monitor_totp_test\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n\u003e **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days; you can either run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [here](#secret-key-extraction-from-spotify-web-player-bundles) for more info) or you can pass `--fetch-secrets` flag in `spotify_monitor_totp_test` (available since v1.6). There is also a [xyloflake/spot-secrets-go/](https://github.com/xyloflake/spot-secrets-go/) repo which offers JSON files that are automatically updated with current secrets (you can pass `--download-secrets` flag in `spotify_monitor_totp_test` to get it automatically from remote URL, available since v1.8).\n\n\u003ca id=\"secret-key-extraction-from-spotify-web-player-bundles\"\u003e\u003c/a\u003e\n### Secret Key Extraction from Spotify Web Player Bundles\n\nThe [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) tool automatically extracts secret keys used for TOTP generation in Spotify Web Player JavaScript bundles.\n\n\u003e 💡 **Quick tip:** The easiest and recommended way to run this tool is via Docker. Jump directly to the [Docker usage section below](#-secret-key-extraction-via-docker-recommended-easiest-way).\n\nDownload from [here](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) or:\n\n```sh\nwget https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/dev/debug/spotify_monitor_secret_grabber.py\n```\n\nInstall requirements:\n\n```sh\npip install playwright\nplaywright install\n```\n\nRun interactively (default output mode):\n\n```sh\npython3 spotify_monitor_secret_grabber.py\n```\n\nYou should get output similar to below:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_secret_grabber.png\" alt=\"spotify_monitor_secret_grabber\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\nShow help:\n```sh\npython3 spotify_monitor_secret_grabber.py -h\n```\n\n---\n\n\u003ca id=\"cli-output-modes\"\u003e\u003c/a\u003e\n### CLI Output Modes\n\nThe script supports several output modes for different use cases:\n\n| Flag | Description | Output |\n|------|--------------|--------|\n| `--secret` | Prints plain JSON array of extracted secrets | `[{\"version\": X, \"secret\": \"...\"}, ...]` |\n| `--secretbytes` | Prints JSON array with ASCII byte values | `[{\"version\": X, \"secret\": [..]}, ...]` |\n| `--secretdict` | Prints JSON object/dict mapping version → byte list | `{\"X\": [..], \"Y\": [..]}` |\n| `--all` | Extracts secrets and **writes all three outputs** to local files | `secrets.json`, `secretBytes.json`, `secretDict.json` |\n\nPrint extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:\n\n```sh\npython3 spotify_monitor_secret_grabber.py --secretdict \u003e secretDict.json\n```\n\nOr, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:\n\n```sh\npython3 spotify_monitor_secret_grabber.py --all\n```\n\nDefault file paths and names can be configured directly in the `OUTPUT_FILES` dictionary at the top of the script.\n\n---\n\n\u003ca id=\"-secret-key-extraction-via-docker-recommended-easiest-way\"\u003e\u003c/a\u003e\n### 🐳 Secret Key Extraction via Docker (Recommended Easiest Way)\n\nA prebuilt multi-architecture image is available on Docker Hub: [`misiektoja/spotify-secrets-grabber`](https://hub.docker.com/r/misiektoja/spotify-secrets-grabber)\n\nThis image works on:\n- macOS (Intel \u0026 Apple Silicon)\n- Linux (x86_64 and ARM64)\n- Windows (Docker Desktop / WSL2)\n- Raspberry Pi 4/5 (64-bit OS)\n\nRun interactively (default output mode):\n\n```sh\ndocker run --rm misiektoja/spotify-secrets-grabber\n```\n\nShow help:\n```sh\ndocker run --rm misiektoja/spotify-secrets-grabber -h\n```\n\nPrint extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:\n```sh\ndocker run --rm misiektoja/spotify-secrets-grabber --secretdict \u003e secretDict.json\n```\n\nOr, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:\n\n```sh\ndocker run --rm -v .:/work -w /work misiektoja/spotify-secrets-grabber --all\n```\n\n*For SELinux hosts (Fedora/RHEL), use `-v .:/work:Z`.*\n\n\u003ca id=\"optional-use-docker-compose-one-command-for-all-oss\"\u003e\u003c/a\u003e\nOr optionally use Docker Compose (a preconfigured [compose.yaml](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber_docker/compose.yaml) file is included in the repo):\n\n```sh\ndocker compose run --rm spotify-secrets-grabber --all\n```\n\nThis will save all files into your current directory on any system (macOS, Linux or Windows).\n\n---\n\nYou can now update the secrets used for TOTP generation (for example `SECRET_CIPHER_DICT` in `spotify_monitor_totp_test`, `spotify_monitor` and `spotify_profile_monitor`) either manually or by referencing an external `secretDict.json` file, which can be hosted in another repo or stored locally. See the description of `SECRET_CIPHER_DICT_URL` in those files for details.\n\n\u003ca id=\"change-log\"\u003e\u003c/a\u003e\n## Change Log\n\nSee [RELEASE_NOTES.md](https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md) for details.\n\n\u003ca id=\"maintainers\"\u003e\u003c/a\u003e\n## Maintainers\n\n[![Maintainer: misiektoja](https://img.shields.io/badge/maintainer-misiektoja-blue)](https://github.com/misiektoja)\n[![Maintainer: tomballgithub](https://img.shields.io/badge/maintainer-tomballgithub-blue)](https://github.com/tomballgithub)\n\n\u003ca id=\"license\"\u003e\u003c/a\u003e\n## License\n\nLicensed under GPLv3. See [LICENSE](https://github.com/misiektoja/spotify_profile_monitor/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisiektoja%2Fspotify_profile_monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisiektoja%2Fspotify_profile_monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisiektoja%2Fspotify_profile_monitor/lists"}