Skip to content

Commit 91054e7

Browse files
authored
Merge pull request #362 from phyzical/feature/353-resolve-insecure-redirect-uri
Feature/353 resolve insecure redirect uri
2 parents 79dd91b + 29bf333 commit 91054e7

File tree

11 files changed

+355
-333
lines changed

11 files changed

+355
-333
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ node_modules/
44
Makefile
55
.DS_STORE
66
*.mp3
7-
.spdlcache
7+
.spdlcache
8+
.spotifydl-*
9+
cookies.txt

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22
1+
FROM node:24
22

33
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
44

@@ -8,9 +8,9 @@ RUN apt update && \
88
ffmpeg && \
99
rm -rf /var/lib/apt/lists/*
1010

11+
RUN npm install -g spotify-dl
1112
## uncomment this for local testing
1213
# COPY ./ /usr/local/lib/node_modules/spotify-dl/
13-
RUN npm install -g spotify-dl
1414

1515
WORKDIR /download
1616
ENTRYPOINT ["spotifydl"]

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# NOTE
2+
3+
login logic is currently in a defunct state see below
4+
5+
I do not have access to the currently used App api keys to change the redirect uri to resolve the uri bug.
6+
7+
```
8+
Starting March 9, 2026, we will start applying the new restrictions and requirements to all applications in “Development Mode” using Spotify’s Web API. This includes:
9+
10+
A Spotify Premium requirement
11+
```
12+
13+
If someone would like to offer up an app id and key for an account feel free to create a pr to change the current key and id, make sure the app has a redirect uri `https://some-random-host.com:7654`
14+
115
# Spotify Downloader
216

317
<p align="center">
@@ -13,7 +27,7 @@
1327

1428
Get [FFMPEG](https://ffmpeg.org/download.html)
1529

16-
[Node.js 22](https://nodejs.org/en/download/package-manager/)
30+
[Node.js 24](https://nodejs.org/en/download/package-manager/)
1731

1832
[git not windows](https://formulae.brew.sh/formula/git)
1933
or
@@ -111,6 +125,7 @@ spotifydl https://open.spotify.com/track/xyz
111125
| --sp | --saved-playlists | download spotify saved playlists |
112126
| --sa | --saved-albums | download spotify saved albums |
113127
| --l | --login | Requests a login in an external window (non tty should use --u and --p) (Docker without -it is non tty) |
128+
| --ak | --app-key | provide app credentials in format `client-id:client-secret` |
114129
| --u | --username | spotify username for headless long (Note: you must use --login once to grant access) |
115130
| --p | --password | spotify password |
116131
| --cf | --cache-file | takes valid output file name path argument |
@@ -127,6 +142,10 @@ spotifydl https://open.spotify.com/track/xyz
127142

128143
To use --u and --p (headless login) you must do a --l once first to grant required permissions (playlists, saved songs ect.)
129144

145+
- for now until someone donates an app key you will need premium and create a new app with the redirect uri of `https://some-random-host.com:7654`
146+
- provide your app credentials via `-ak` or `--app-key` in format `client-id:client-secret`
147+
- you now need to add `127.0.0.1 some-random-host.com` to `/etc/hosts` if linux or `C:\Windows\System32\Drivers\etc\hosts` if windows
148+
130149
if you receive 'Got a spotify api error WebapiRegularError: An error occurred while communicating with Spotify's Web API
131150
Details: non existing id' you may need to provide auth either use `--l` for manual login prompt or `--u username --p password` for headless login
132151

config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
output: process.cwd(),
1010
extraSearch: '',
1111
login: false,
12+
appKey: '',
1213
password: '',
1314
username: '',
1415
savedAlbums: false,
@@ -23,8 +24,8 @@ export default {
2324
outputFileType: 'mp3',
2425
},
2526
spotifyApi: {
26-
clientId: 'acc6302297e040aeb6e4ac1fbdfd62c3',
27-
clientSecret: '0e8439a1280a43aba9a5bc0a16f3f009',
27+
clientId: 'b334016b45e24f7781b0909f24cf2ea7',
28+
clientSecret: '96f03b93dda34dee9edc78c76f5ca9c1',
2829
},
2930
isTTY: process.stdout.isTTY,
3031
};

0 commit comments

Comments
 (0)