-
Notifications
You must be signed in to change notification settings - Fork 273
Description
Recommended workaround: use browser based auth instead of oauth.
Discussed in #812
Originally posted by rawinkler September 1, 2025
- I confirm that I have read the FAQ
Bug description
Since last Friday, August 29th 2025, suddenly my code stopped working. I use ytmusicapi version 1.11.0.
I get the error:
File "/usr/local/lib/python3.13/site-packages/ytmusicapi/mixins/search.py", line 182, in search
response = self._send_request(endpoint, body)
File "/usr/local/lib/python3.13/site-packages/ytmusicapi/ytmusic.py", line 241, in _send_request
raise YTMusicServerError(message + error)
ytmusicapi.exceptions.YTMusicServerError: Server returned HTTP 400: Bad Request.
Request contains an invalid argument.
To Reproduce
Minimal example:
YT_CLIENT = \
YTMusic("/usr/src/app/oauth.json",
oauth_credentials=OAuthCredentials(
client_id=environ["GOOGLE_YOUTUBE_API_CLIENT_ID"],
client_secret=environ["GOOGLE_YOUTUBE_API_CLIENT_SECRET"]
)
)
search_results = YT_CLIENT.search('Oasis Wonderwall')
Is it possible that YouTube changed something that causes ytmusicapi to break?
Thanks for any help!