Skip to content

Active premium subscription required for the owner of the app #2634

@purplelunamine

Description

@purplelunamine

System OS

Linux

Python Version

3.12 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.4.3

Expected Behavior vs Actual Behavior

Trying to download anything immediately shows an error, saying: Active premium subscription required for the owner of the app. When the subscription status changes, it can take a few hours before requests are allowed again.
Apparently the Spotify API now needs the owner of the app to have premium to access the web API.

Steps to reproduce - Ensure to include actual links!

  1. Start a download spotdl https://open.spotify.com/album/7jwikgbD6e5Oht9gJzaR3l --audio youtube-music youtube --lyrics synced musixmatch genius --user-auth
  2. I get an error

Traceback

Processing query: https://open.spotify.com/album/7jwikgbD6e5Oht9gJzaR3l                                                                                                

An error occurred                                                                                                                                                      
╭───────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────╮
│ /home/lumine/venv/lib/python3.12/site-packages/spotipy/client.py:271 in _internal_call                                                                              │
│                                                                                                                                                                     │
│    268 │   │   │   │   timeout=self.requests_timeout, **args                                                                                                        │
│    269 │   │   │   )                                                                                                                                                │
│    270 │   │   │                                                                                                                                                    │
│ ❱  271 │   │   │   response.raise_for_status()                                                                                                                      │
│    272 │   │   │   results = response.json()                                                                                                                        │
│    273 │   │   except requests.exceptions.HTTPError as http_error:                                                                                                  │
│    274 │   │   │   response = http_error.response                                                                                                                   │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/requests/models.py:1028 in raise_for_status                                                                          │
│                                                                                                                                                                     │
│   1025 │   │   │   )                                                                                                                                                │
│   1026 │   │                                                                                                                                                        │
│   1027 │   │   if http_error_msg:                                                                                                                                   │
│ ❱ 1028 │   │   │   raise HTTPError(http_error_msg, response=self)                                                                                                   │
│   1029 │                                                                                                                                                            │
│   1030 │   def close(self):                                                                                                                                         │
│   1031 │   │   """Releases the connection back to the pool. Once this method has been                                                                               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/albums/7jwikgbD6e5Oht9gJzaR3l                                                               
                                                                                                                                                                       
During handling of the above exception, another exception occurred:                                                                                                    
                                                                                                                                                                       
╭───────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────╮
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/console/entry_point.py:160 in entry_point                                                                     │
│                                                                                                                                                                     │
│   157 │   try:                                                                                                                                                      │
│   158 │   │   # Pick the operation to perform                                                                                                                       │
│   159 │   │   # based on the name and run it!                                                                                                                       │
│ ❱ 160 │   │   OPERATIONS[arguments.operation](                                                                                                                      │
│   161 │   │   │   query=arguments.query,                                                                                                                            │
│   162 │   │   │   downloader=downloader,                                                                                                                            │
│   163 │   │   )                                                                                                                                                     │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/console/download.py:25 in download                                                                            │
│                                                                                                                                                                     │
│   22 │   """                                                                                                                                                        │
│   23 │                                                                                                                                                              │
│   24 │   # Parse the query                                                                                                                                          │
│ ❱ 25 │   songs = get_simple_songs(                                                                                                                                  │
│   26 │   │   query,                                                                                                                                                 │
│   27 │   │   use_ytm_data=downloader.settings["ytm_data"],                                                                                                          │
│   28 │   │   playlist_numbering=downloader.settings["playlist_numbering"],                                                                                          │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/utils/search.py:266 in get_simple_songs                                                                       │
│                                                                                                                                                                     │
│   263 │   │   elif "open.spotify.com" in request and "playlist" in request:                                                                                         │
│   264 │   │   │   lists.append(Playlist.from_url(request, fetch_songs=False))                                                                                       │
│   265 │   │   elif "open.spotify.com" in request and "album" in request:                                                                                            │
│ ❱ 266 │   │   │   lists.append(Album.from_url(request, fetch_songs=False))                                                                                          │
│   267 │   │   elif "open.spotify.com" in request and "artist" in request:                                                                                           │
│   268 │   │   │   lists.append(Artist.from_url(request, fetch_songs=False))                                                                                         │
│   269 │   │   elif "open.spotify.com" in request and "user" in request:                                                                                             │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/types/song.py:306 in from_url                                                                                 │
│                                                                                                                                                                     │
│   303 │   │   - The SongList object.                                                                                                                                │
│   304 │   │   """                                                                                                                                                   │
│   305 │   │                                                                                                                                                         │
│ ❱ 306 │   │   metadata, songs = cls.get_metadata(url)                                                                                                               │
│   307 │   │   urls = [song.url for song in songs]                                                                                                                   │
│   308 │   │                                                                                                                                                         │
│   309 │   │   if fetch_songs:                                                                                                                                       │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/types/album.py:42 in get_metadata                                                                             │
│                                                                                                                                                                     │
│    39 │   │                                                                                                                                                         │
│    40 │   │   spotify_client = SpotifyClient()                                                                                                                      │
│    41 │   │                                                                                                                                                         │
│ ❱  42 │   │   album_metadata = spotify_client.album(url)                                                                                                            │
│    43 │   │   if album_metadata is None:                                                                                                                            │
│    44 │   │   │   raise AlbumError(                                                                                                                                 │
│    45 │   │   │   │   "Couldn't get metadata, check if you have passed correct album id"                                                                            │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotipy/client.py:487 in album                                                                                       │
│                                                                                                                                                                     │
│    484 │   │   if market is not None:                                                                                                                               │
│    485 │   │   │   return self._get("albums/" + trid + '?market=' + market)                                                                                         │
│    486 │   │   else:                                                                                                                                                │
│ ❱  487 │   │   │   return self._get("albums/" + trid)                                                                                                               │
│    488 │                                                                                                                                                            │
│    489 │   def album_tracks(self, album_id, limit=50, offset=0, market=None):                                                                                       │
│    490 │   │   """ Get Spotify catalog information about an album's tracks                                                                                          │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotdl/utils/spotify.py:195 in _get                                                                                  │
│                                                                                                                                                                     │
│   192 │   │   retries = self.max_retries  # type: ignore # pylint: disable=E1101                                                                                    │
│   193 │   │   while response is None:                                                                                                                               │
│   194 │   │   │   try:                                                                                                                                              │
│ ❱ 195 │   │   │   │   response = self._internal_call("GET", url, payload, kwargs)                                                                                   │
│   196 │   │   │   except (requests.exceptions.Timeout, requests.ConnectionError) as exc:                                                                            │
│   197 │   │   │   │   retries -= 1                                                                                                                                  │
│   198 │   │   │   │   if retries <= 0:                                                                                                                              │
│                                                                                                                                                                     │
│ /home/lumine/venv/lib/python3.12/site-packages/spotipy/client.py:291 in _internal_call                                                                              │
│                                                                                                                                                                     │
│    288 │   │   │   logger.error(f"HTTP Error for {method} to {url} with Params: "                                                                                   │
│    289 │   │   │   │   │   │    f"{args.get('params')} returned {response.status_code} due to                                                                       │
│        {msg}")                                                                                                                                                      │
│    290 │   │   │                                                                                                                                                    │
│ ❱  291 │   │   │   raise SpotifyException(                                                                                                                          │
│    292 │   │   │   │   response.status_code,                                                                                                                        │
│    293 │   │   │   │   -1,                                                                                                                                          │
│    294 │   │   │   │   f"{response.url}:\n {msg}",                                                                                                                  │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
SpotifyException: http status: 403, code: -1 - https://api.spotify.com/v1/albums/7jwikgbD6e5Oht9gJzaR3l:                                                               
 Active premium subscription required for the owner of the app. When the subscription status changes, it can take a few hours before requests are allowed again.,      
reason: None

Other details

Operating System: KDE neon User Edition
KDE Plasma Version: 6.6.3
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.17.0-19-generic (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugUnexpected problem or unintended behavior that needs to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions