Repository navigation
Error fetching license exchange data (Status code: 429) #306
Copy link
Copy link
Open
Description
Upgraded from 2.9 to 3.7.1, suddenly started experiencing these errors on every song when trying to pull any song or playlist or album:
192:~ user$ gamdl "https://music.apple.com/pl/album/do-it-again/1650885288?i=1650885292&l=pl"
[INFO 18:44:33] Starting Gamdl 3.7.1
[INFO 18:44:35] [URL 1/1 ] Processing "https://music.apple.com/pl/album/do-it-again/1650885288?i=1650885292&l=pl"
[INFO 18:44:35] [Track 1/1 ] Downloading "Do It Again"
Traceback (most recent call last):
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/api/apple_music.py", line 735, in get_license_exchange
response.raise_for_status()
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/httpx/_models.py", line 829, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '429 Too Many Requests' for url 'https://play.itunes.apple.com/WebObjects/MZPlay.woa/wa/acquireWebPlaybackLicense'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/cli/cli.py", line 271, in main
await downloader.download(download_item)
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/downloader/downloader.py", line 82, in download
raise item.media.error
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/interface/interface.py", line 115, in _get_song_media
async for media in self.song.get_media(media):
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/interface/song.py", line 594, in get_media
audio_track=await self.base.get_decryption_key(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/interface/base.py", line 180, in get_decryption_key
license = await self.apple_music_api.get_license_exchange(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/.local/pipx/venvs/gamdl/lib/python3.12/site-packages/gamdl/api/apple_music.py", line 738, in get_license_exchange
raise GamdlApiResponseError(
gamdl.api.exceptions.GamdlApiResponseError: Error fetching license exchange data (Status code: 429)
[ERROR 18:44:35] [Track 1/1 ] Error downloading "Do It Again"
[INFO 18:44:35] Finished with 1 error(s)
192:~ user$ Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
schiffko commentedon Jun 3, 2026
yes, same problem here!
amaurieboese commentedon Jun 3, 2026
same here
scarlimange commentedon Jun 6, 2026
I think this is a server side rate limit because it only happens at least half way through large downloads and then keeps happening when I try to run a different download from the beginning
wp3gi commentedon Jul 9, 2026
Does this ever return back to normal?
scarlimange commentedon Jul 9, 2026
Just wait a couple hours and shrink the playlist you're grabbing
twinfami commentedon Jul 16, 2026
Did just that and it's still throwing up those errors a few hours later. Maybe there needs to be a cooldown added or in this case I have, if the song is already there, to automatically skip downloading and NOT queue for the license. Check the local file name FIRST, then skip if there. So if there were songs it didn't download and later on I try to download them again, it doesn't throw the error up and just grab what was missed the first time.
twinfami commentedon Jul 16, 2026
We shouldn't have to shrink our playlists. This program should work better so that it doesn't keep pinging the server when not needed.
wp3gi commentedon Jul 21, 2026
Can the 429 error be solved by using another account's cookie.txt? or do you also need a different IP address or device?