Skip to content

[Bug Report] Error 400 on Oauth2 #1830

@bjarkeh14

Description

@bjarkeh14

Bug Description

I keep getting an HttpError: 400 Bad Request when I try to play a song from YouTube
I have set up

YtdlpOAuth2ClientID
YtdlpOAuth2ClientSecret
YtdlpUseOAuth2 = yes

Made an app on google cloud

When I start the bot up it ask me to "sign in" and I go to google.com/device and all that.
It say success the bot makes a oauth2.token in /data folder

But when I try to play a song I get 400 Bad Request on the [youtube+oauth2]

Steps to Reproduce

  1. Start the bot
  2. try to play a song
  3. Bad Request to YouTube

Expected Result

That it would play the song

Debug Output

[2025-07-24 11:01:48,184] DEBUG - musicbot.bot | In bot.py::MainThread(4184), line 1252 in on_player_finished_playing: Running on_player_finished_playing
[2025-07-24 11:01:48,184] DEBUG - musicbot.bot | In bot.py::MainThread(4184), line 1357 in on_player_finished_playing: No content in current autoplaylist. Filling with new music...
[2025-07-24 11:01:49,184] ERROR - musicbot.bot | In bot.py::MainThread(4184), line 1418 in on_player_finished_playing: Error extracting song "https://youtube.com/watch?v=umdi-RZ8ntM": ERROR: [youtube+oauth2] umdi-RZ8ntM: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
Traceback (most recent call last):
File "C:\Python\Lib\site-packages\yt_dlp\networking_urllib.py", line 399, in _send
res = opener.open(urllib_req, timeout=self._calculate_timeout(request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\urllib\request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^

Additional Info

No response

Checklist

JMusicBot Version

release-040724-137-g2861810-modded

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions