spotify-monitor 2.0rc2__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spotify-monitor might be problematic. Click here for more details.
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/PKG-INFO +67 -7
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/README.md +66 -6
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/pyproject.toml +1 -1
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/PKG-INFO +67 -7
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.py +940 -106
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/LICENSE +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/setup.cfg +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/SOURCES.txt +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/dependency_links.txt +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/entry_points.txt +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/requires.txt +0 -0
- {spotify_monitor-2.0rc2 → spotify_monitor-2.1.1}/spotify_monitor.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spotify_monitor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Tool implementing real-time tracking of Spotify friends music activity
|
|
5
5
|
Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -29,6 +29,10 @@ spotify_monitor is a tool for real-time monitoring of Spotify friends' music act
|
|
|
29
29
|
|
|
30
30
|
NOTE: If you're interested in tracking changes to Spotify users' profiles including their playlists, take a look at another tool I've developed: [spotify_profile_monitor](https://github.com/misiektoja/spotify_profile_monitor).
|
|
31
31
|
|
|
32
|
+
> Spotify made multiple changes to the web endpoint on June 10th 2025, which broke the **[sp_dc cookie](#spotify-sp_dc-cookie)** method.
|
|
33
|
+
> 📦 The issue is under investigation to determine if it can be restored.
|
|
34
|
+
> 👉 In the meantime, use **[desktop client](#spotify-desktop-client)** method instead.
|
|
35
|
+
|
|
32
36
|
<a id="features"></a>
|
|
33
37
|
## Features
|
|
34
38
|
|
|
@@ -56,7 +60,9 @@ NOTE: If you're interested in tracking changes to Spotify users' profiles includ
|
|
|
56
60
|
3. [Quick Start](#quick-start)
|
|
57
61
|
4. [Configuration](#configuration)
|
|
58
62
|
* [Configuration File](#configuration-file)
|
|
59
|
-
* [Spotify
|
|
63
|
+
* [Spotify access token source](#spotify-access-token-source)
|
|
64
|
+
* [Spotify sp_dc Cookie](#spotify-sp_dc-cookie)
|
|
65
|
+
* [Spotify Desktop Client](#spotify-desktop-client)
|
|
60
66
|
* [Following the Monitored User](#following-the-monitored-user)
|
|
61
67
|
* [How to Get a Friend's User URI ID](#how-to-get-a-friends-user-uri-id)
|
|
62
68
|
* [SMTP Settings](#smtp-settings)
|
|
@@ -153,8 +159,23 @@ spotify_monitor --generate-config > spotify_monitor.conf
|
|
|
153
159
|
|
|
154
160
|
Edit the `spotify_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).
|
|
155
161
|
|
|
162
|
+
<a id="spotify-access-token-source"></a>
|
|
163
|
+
#### Spotify access token source
|
|
164
|
+
|
|
165
|
+
The tool supports two methods for obtaining a Spotify access token.
|
|
166
|
+
|
|
167
|
+
It can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
|
|
168
|
+
|
|
169
|
+
The **recommended method** is `cookie` which uses the sp_dc cookie to retrieve a token from the Spotify web endpoint.
|
|
170
|
+
|
|
171
|
+
The **alternative method** is `client` which uses captured credentials from the Spotify desktop client and a Protobuf-based login flow. This approach is intended for advanced users who want an indefinitely valid token with the widest scope.
|
|
172
|
+
|
|
173
|
+
If no method is specified, the tool defaults to the `cookie` method.
|
|
174
|
+
|
|
156
175
|
<a id="spotify-sp_dc-cookie"></a>
|
|
157
|
-
|
|
176
|
+
#### Spotify sp_dc Cookie
|
|
177
|
+
|
|
178
|
+
It is default method used to obtain a Spotify access token.
|
|
158
179
|
|
|
159
180
|
Log in to [https://open.spotify.com/](https://open.spotify.com/) in your web browser.
|
|
160
181
|
|
|
@@ -170,11 +191,50 @@ Provide the `SP_DC_COOKIE` secret using one of the following methods:
|
|
|
170
191
|
Fallback:
|
|
171
192
|
- Hard-code it in the code or config file
|
|
172
193
|
|
|
173
|
-
|
|
194
|
+
You will be informed by the tool once the `sp_dc` cookie expires (proper message on the console and in email).
|
|
174
195
|
|
|
175
196
|
If you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to the process 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).
|
|
176
197
|
|
|
177
|
-
It is recommended to
|
|
198
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
199
|
+
|
|
200
|
+
<a id="spotify-desktop-client"></a>
|
|
201
|
+
#### Spotify Desktop Client
|
|
202
|
+
|
|
203
|
+
To use credentials captured from the Spotify desktop client to obtain an access token, set the `TOKEN_SOURCE` configuration option to `client` or use the `--token-source client` flag.
|
|
204
|
+
|
|
205
|
+
Run an intercepting proxy of your choice (like [Proxyman](https://proxyman.com)).
|
|
206
|
+
|
|
207
|
+
Launch the Spotify desktop client and look for POST requests to `https://login{n}.spotify.com/v3/login`
|
|
208
|
+
|
|
209
|
+
Note: The `login` part is suffixed with one or more digits (e.g. `login5`).
|
|
210
|
+
|
|
211
|
+
If you don't see this request, log out from the client and log back in.
|
|
212
|
+
|
|
213
|
+
Export the login request body (a binary Protobuf payload) to a file.
|
|
214
|
+
|
|
215
|
+
In Proxyman: ***right click the request → Export → Request Body → Save File***.
|
|
216
|
+
|
|
217
|
+
<p align="center">
|
|
218
|
+
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/proxyman_export_protobuf.png" alt="proxyman_export_protobuf" width="80%"/>
|
|
219
|
+
</p>
|
|
220
|
+
|
|
221
|
+
Then run the tool with `-w <path-to-login-request-body-file>`:
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
spotify_monitor --token-source client -w <path-to-login-request-body-file> <spotify_user_uri_id>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If successful, the tool will automatically extract the necessary fields and begin monitoring.
|
|
228
|
+
|
|
229
|
+
You can also persist the Protobuf request file path using the `LOGIN_REQUEST_BODY_FILE` configuration option.
|
|
230
|
+
|
|
231
|
+
The tool will automatically refresh both the access token and client token using the intercepted refresh token.
|
|
232
|
+
|
|
233
|
+
Advanced options are available for further customization - refer to the configuration file comments. However, default settings should work for most cases.
|
|
234
|
+
|
|
235
|
+
You will be informed by the tool once the refresh token expires (proper message on the console and in email).
|
|
236
|
+
|
|
237
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
178
238
|
|
|
179
239
|
<a id="following-the-monitored-user"></a>
|
|
180
240
|
### Following the Monitored User
|
|
@@ -259,7 +319,7 @@ To monitor specific user activity, just type [Spotify user URI ID](#how-to-get-a
|
|
|
259
319
|
spotify_monitor <spotify_user_uri_id>
|
|
260
320
|
```
|
|
261
321
|
|
|
262
|
-
If you have not set `SP_DC_COOKIE` secret, you can use `-u` flag:
|
|
322
|
+
If 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:
|
|
263
323
|
|
|
264
324
|
```sh
|
|
265
325
|
spotify_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
|
|
@@ -461,7 +521,7 @@ List of supported signals:
|
|
|
461
521
|
| PIPE | Toggle email notifications when user plays song on loop (-x) |
|
|
462
522
|
| TRAP | Increase the inactivity check timer (by 30 seconds) (-o) |
|
|
463
523
|
| ABRT | Decrease the inactivity check timer (by 30 seconds) (-o) |
|
|
464
|
-
| HUP | Reload secrets from .env file |
|
|
524
|
+
| HUP | Reload secrets from .env file and token source credentials from Protobuf files |
|
|
465
525
|
|
|
466
526
|
Send signals with `kill` or `pkill`, e.g.:
|
|
467
527
|
|
|
@@ -4,6 +4,10 @@ spotify_monitor is a tool for real-time monitoring of Spotify friends' music act
|
|
|
4
4
|
|
|
5
5
|
NOTE: If you're interested in tracking changes to Spotify users' profiles including their playlists, take a look at another tool I've developed: [spotify_profile_monitor](https://github.com/misiektoja/spotify_profile_monitor).
|
|
6
6
|
|
|
7
|
+
> Spotify made multiple changes to the web endpoint on June 10th 2025, which broke the **[sp_dc cookie](#spotify-sp_dc-cookie)** method.
|
|
8
|
+
> 📦 The issue is under investigation to determine if it can be restored.
|
|
9
|
+
> 👉 In the meantime, use **[desktop client](#spotify-desktop-client)** method instead.
|
|
10
|
+
|
|
7
11
|
<a id="features"></a>
|
|
8
12
|
## Features
|
|
9
13
|
|
|
@@ -31,7 +35,9 @@ NOTE: If you're interested in tracking changes to Spotify users' profiles includ
|
|
|
31
35
|
3. [Quick Start](#quick-start)
|
|
32
36
|
4. [Configuration](#configuration)
|
|
33
37
|
* [Configuration File](#configuration-file)
|
|
34
|
-
* [Spotify
|
|
38
|
+
* [Spotify access token source](#spotify-access-token-source)
|
|
39
|
+
* [Spotify sp_dc Cookie](#spotify-sp_dc-cookie)
|
|
40
|
+
* [Spotify Desktop Client](#spotify-desktop-client)
|
|
35
41
|
* [Following the Monitored User](#following-the-monitored-user)
|
|
36
42
|
* [How to Get a Friend's User URI ID](#how-to-get-a-friends-user-uri-id)
|
|
37
43
|
* [SMTP Settings](#smtp-settings)
|
|
@@ -128,8 +134,23 @@ spotify_monitor --generate-config > spotify_monitor.conf
|
|
|
128
134
|
|
|
129
135
|
Edit the `spotify_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).
|
|
130
136
|
|
|
137
|
+
<a id="spotify-access-token-source"></a>
|
|
138
|
+
#### Spotify access token source
|
|
139
|
+
|
|
140
|
+
The tool supports two methods for obtaining a Spotify access token.
|
|
141
|
+
|
|
142
|
+
It can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
|
|
143
|
+
|
|
144
|
+
The **recommended method** is `cookie` which uses the sp_dc cookie to retrieve a token from the Spotify web endpoint.
|
|
145
|
+
|
|
146
|
+
The **alternative method** is `client` which uses captured credentials from the Spotify desktop client and a Protobuf-based login flow. This approach is intended for advanced users who want an indefinitely valid token with the widest scope.
|
|
147
|
+
|
|
148
|
+
If no method is specified, the tool defaults to the `cookie` method.
|
|
149
|
+
|
|
131
150
|
<a id="spotify-sp_dc-cookie"></a>
|
|
132
|
-
|
|
151
|
+
#### Spotify sp_dc Cookie
|
|
152
|
+
|
|
153
|
+
It is default method used to obtain a Spotify access token.
|
|
133
154
|
|
|
134
155
|
Log in to [https://open.spotify.com/](https://open.spotify.com/) in your web browser.
|
|
135
156
|
|
|
@@ -145,11 +166,50 @@ Provide the `SP_DC_COOKIE` secret using one of the following methods:
|
|
|
145
166
|
Fallback:
|
|
146
167
|
- Hard-code it in the code or config file
|
|
147
168
|
|
|
148
|
-
|
|
169
|
+
You will be informed by the tool once the `sp_dc` cookie expires (proper message on the console and in email).
|
|
149
170
|
|
|
150
171
|
If you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to the process 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).
|
|
151
172
|
|
|
152
|
-
It is recommended to
|
|
173
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
174
|
+
|
|
175
|
+
<a id="spotify-desktop-client"></a>
|
|
176
|
+
#### Spotify Desktop Client
|
|
177
|
+
|
|
178
|
+
To use credentials captured from the Spotify desktop client to obtain an access token, set the `TOKEN_SOURCE` configuration option to `client` or use the `--token-source client` flag.
|
|
179
|
+
|
|
180
|
+
Run an intercepting proxy of your choice (like [Proxyman](https://proxyman.com)).
|
|
181
|
+
|
|
182
|
+
Launch the Spotify desktop client and look for POST requests to `https://login{n}.spotify.com/v3/login`
|
|
183
|
+
|
|
184
|
+
Note: The `login` part is suffixed with one or more digits (e.g. `login5`).
|
|
185
|
+
|
|
186
|
+
If you don't see this request, log out from the client and log back in.
|
|
187
|
+
|
|
188
|
+
Export the login request body (a binary Protobuf payload) to a file.
|
|
189
|
+
|
|
190
|
+
In Proxyman: ***right click the request → Export → Request Body → Save File***.
|
|
191
|
+
|
|
192
|
+
<p align="center">
|
|
193
|
+
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/proxyman_export_protobuf.png" alt="proxyman_export_protobuf" width="80%"/>
|
|
194
|
+
</p>
|
|
195
|
+
|
|
196
|
+
Then run the tool with `-w <path-to-login-request-body-file>`:
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
spotify_monitor --token-source client -w <path-to-login-request-body-file> <spotify_user_uri_id>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
If successful, the tool will automatically extract the necessary fields and begin monitoring.
|
|
203
|
+
|
|
204
|
+
You can also persist the Protobuf request file path using the `LOGIN_REQUEST_BODY_FILE` configuration option.
|
|
205
|
+
|
|
206
|
+
The tool will automatically refresh both the access token and client token using the intercepted refresh token.
|
|
207
|
+
|
|
208
|
+
Advanced options are available for further customization - refer to the configuration file comments. However, default settings should work for most cases.
|
|
209
|
+
|
|
210
|
+
You will be informed by the tool once the refresh token expires (proper message on the console and in email).
|
|
211
|
+
|
|
212
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
153
213
|
|
|
154
214
|
<a id="following-the-monitored-user"></a>
|
|
155
215
|
### Following the Monitored User
|
|
@@ -234,7 +294,7 @@ To monitor specific user activity, just type [Spotify user URI ID](#how-to-get-a
|
|
|
234
294
|
spotify_monitor <spotify_user_uri_id>
|
|
235
295
|
```
|
|
236
296
|
|
|
237
|
-
If you have not set `SP_DC_COOKIE` secret, you can use `-u` flag:
|
|
297
|
+
If 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:
|
|
238
298
|
|
|
239
299
|
```sh
|
|
240
300
|
spotify_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
|
|
@@ -436,7 +496,7 @@ List of supported signals:
|
|
|
436
496
|
| PIPE | Toggle email notifications when user plays song on loop (-x) |
|
|
437
497
|
| TRAP | Increase the inactivity check timer (by 30 seconds) (-o) |
|
|
438
498
|
| ABRT | Decrease the inactivity check timer (by 30 seconds) (-o) |
|
|
439
|
-
| HUP | Reload secrets from .env file |
|
|
499
|
+
| HUP | Reload secrets from .env file and token source credentials from Protobuf files |
|
|
440
500
|
|
|
441
501
|
Send signals with `kill` or `pkill`, e.g.:
|
|
442
502
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spotify_monitor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Tool implementing real-time tracking of Spotify friends music activity
|
|
5
5
|
Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -29,6 +29,10 @@ spotify_monitor is a tool for real-time monitoring of Spotify friends' music act
|
|
|
29
29
|
|
|
30
30
|
NOTE: If you're interested in tracking changes to Spotify users' profiles including their playlists, take a look at another tool I've developed: [spotify_profile_monitor](https://github.com/misiektoja/spotify_profile_monitor).
|
|
31
31
|
|
|
32
|
+
> Spotify made multiple changes to the web endpoint on June 10th 2025, which broke the **[sp_dc cookie](#spotify-sp_dc-cookie)** method.
|
|
33
|
+
> 📦 The issue is under investigation to determine if it can be restored.
|
|
34
|
+
> 👉 In the meantime, use **[desktop client](#spotify-desktop-client)** method instead.
|
|
35
|
+
|
|
32
36
|
<a id="features"></a>
|
|
33
37
|
## Features
|
|
34
38
|
|
|
@@ -56,7 +60,9 @@ NOTE: If you're interested in tracking changes to Spotify users' profiles includ
|
|
|
56
60
|
3. [Quick Start](#quick-start)
|
|
57
61
|
4. [Configuration](#configuration)
|
|
58
62
|
* [Configuration File](#configuration-file)
|
|
59
|
-
* [Spotify
|
|
63
|
+
* [Spotify access token source](#spotify-access-token-source)
|
|
64
|
+
* [Spotify sp_dc Cookie](#spotify-sp_dc-cookie)
|
|
65
|
+
* [Spotify Desktop Client](#spotify-desktop-client)
|
|
60
66
|
* [Following the Monitored User](#following-the-monitored-user)
|
|
61
67
|
* [How to Get a Friend's User URI ID](#how-to-get-a-friends-user-uri-id)
|
|
62
68
|
* [SMTP Settings](#smtp-settings)
|
|
@@ -153,8 +159,23 @@ spotify_monitor --generate-config > spotify_monitor.conf
|
|
|
153
159
|
|
|
154
160
|
Edit the `spotify_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).
|
|
155
161
|
|
|
162
|
+
<a id="spotify-access-token-source"></a>
|
|
163
|
+
#### Spotify access token source
|
|
164
|
+
|
|
165
|
+
The tool supports two methods for obtaining a Spotify access token.
|
|
166
|
+
|
|
167
|
+
It can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
|
|
168
|
+
|
|
169
|
+
The **recommended method** is `cookie` which uses the sp_dc cookie to retrieve a token from the Spotify web endpoint.
|
|
170
|
+
|
|
171
|
+
The **alternative method** is `client` which uses captured credentials from the Spotify desktop client and a Protobuf-based login flow. This approach is intended for advanced users who want an indefinitely valid token with the widest scope.
|
|
172
|
+
|
|
173
|
+
If no method is specified, the tool defaults to the `cookie` method.
|
|
174
|
+
|
|
156
175
|
<a id="spotify-sp_dc-cookie"></a>
|
|
157
|
-
|
|
176
|
+
#### Spotify sp_dc Cookie
|
|
177
|
+
|
|
178
|
+
It is default method used to obtain a Spotify access token.
|
|
158
179
|
|
|
159
180
|
Log in to [https://open.spotify.com/](https://open.spotify.com/) in your web browser.
|
|
160
181
|
|
|
@@ -170,11 +191,50 @@ Provide the `SP_DC_COOKIE` secret using one of the following methods:
|
|
|
170
191
|
Fallback:
|
|
171
192
|
- Hard-code it in the code or config file
|
|
172
193
|
|
|
173
|
-
|
|
194
|
+
You will be informed by the tool once the `sp_dc` cookie expires (proper message on the console and in email).
|
|
174
195
|
|
|
175
196
|
If you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to the process 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).
|
|
176
197
|
|
|
177
|
-
It is recommended to
|
|
198
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
199
|
+
|
|
200
|
+
<a id="spotify-desktop-client"></a>
|
|
201
|
+
#### Spotify Desktop Client
|
|
202
|
+
|
|
203
|
+
To use credentials captured from the Spotify desktop client to obtain an access token, set the `TOKEN_SOURCE` configuration option to `client` or use the `--token-source client` flag.
|
|
204
|
+
|
|
205
|
+
Run an intercepting proxy of your choice (like [Proxyman](https://proxyman.com)).
|
|
206
|
+
|
|
207
|
+
Launch the Spotify desktop client and look for POST requests to `https://login{n}.spotify.com/v3/login`
|
|
208
|
+
|
|
209
|
+
Note: The `login` part is suffixed with one or more digits (e.g. `login5`).
|
|
210
|
+
|
|
211
|
+
If you don't see this request, log out from the client and log back in.
|
|
212
|
+
|
|
213
|
+
Export the login request body (a binary Protobuf payload) to a file.
|
|
214
|
+
|
|
215
|
+
In Proxyman: ***right click the request → Export → Request Body → Save File***.
|
|
216
|
+
|
|
217
|
+
<p align="center">
|
|
218
|
+
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/proxyman_export_protobuf.png" alt="proxyman_export_protobuf" width="80%"/>
|
|
219
|
+
</p>
|
|
220
|
+
|
|
221
|
+
Then run the tool with `-w <path-to-login-request-body-file>`:
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
spotify_monitor --token-source client -w <path-to-login-request-body-file> <spotify_user_uri_id>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If successful, the tool will automatically extract the necessary fields and begin monitoring.
|
|
228
|
+
|
|
229
|
+
You can also persist the Protobuf request file path using the `LOGIN_REQUEST_BODY_FILE` configuration option.
|
|
230
|
+
|
|
231
|
+
The tool will automatically refresh both the access token and client token using the intercepted refresh token.
|
|
232
|
+
|
|
233
|
+
Advanced options are available for further customization - refer to the configuration file comments. However, default settings should work for most cases.
|
|
234
|
+
|
|
235
|
+
You will be informed by the tool once the refresh token expires (proper message on the console and in email).
|
|
236
|
+
|
|
237
|
+
**Important**: It is strongly recommended to use a separate Spotify account with this tool. It does not rely on the official Spotify Web API for core features (like fetching friend activity), as it is not supported by the public API.
|
|
178
238
|
|
|
179
239
|
<a id="following-the-monitored-user"></a>
|
|
180
240
|
### Following the Monitored User
|
|
@@ -259,7 +319,7 @@ To monitor specific user activity, just type [Spotify user URI ID](#how-to-get-a
|
|
|
259
319
|
spotify_monitor <spotify_user_uri_id>
|
|
260
320
|
```
|
|
261
321
|
|
|
262
|
-
If you have not set `SP_DC_COOKIE` secret, you can use `-u` flag:
|
|
322
|
+
If 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:
|
|
263
323
|
|
|
264
324
|
```sh
|
|
265
325
|
spotify_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
|
|
@@ -461,7 +521,7 @@ List of supported signals:
|
|
|
461
521
|
| PIPE | Toggle email notifications when user plays song on loop (-x) |
|
|
462
522
|
| TRAP | Increase the inactivity check timer (by 30 seconds) (-o) |
|
|
463
523
|
| ABRT | Decrease the inactivity check timer (by 30 seconds) (-o) |
|
|
464
|
-
| HUP | Reload secrets from .env file |
|
|
524
|
+
| HUP | Reload secrets from .env file and token source credentials from Protobuf files |
|
|
465
525
|
|
|
466
526
|
Send signals with `kill` or `pkill`, e.g.:
|
|
467
527
|
|