Skip to content

error:0A000126:SSL routines::unexpected eof, browser fingerprint is needed #912

@ring1012

Description

@ring1012

Is your feature request related to a problem? Please describe.
Yes. When using ytmusicapi from a VPS or server with an outbound IP, YouTube Music often blocks the connection. Standard HTTP requests fail because YouTube requires a browser-like TLS handshake. Attempting a simple curl or requests call results in TLS errors:

TLSv1.3 (OUT), TLS alert, decode error
error:0A000126:SSL routines::unexpected eof while reading

This makes ytmusicapi unusable on servers without browser fingerprint emulation.

Describe the solution you'd like
I would like ytmusicapi to support browser-like TLS and HTTP fingerprints, similar to how yt-dlp does it, possibly by integrating curl-cffi or a similar library. This would allow requests to succeed from VPS or server environments without being blocked by YouTube Music. I tested curl-cffi , works for me.

Describe alternatives you've considered

Rotating VPS IPs or using a VPN: temporary and not reliable.
Using Selenium or Playwright to fetch cookies and tokens: works but adds heavy dependencies.
Using yt-dlp directly: bypasses the problem but is not a direct API solution within Python.

Additional context
curl-cffi allows faking modern browser TLS fingerprints, which prevents YouTube Music from rejecting connections at the TLS handshake stage. Integrating this into ytmusicapi would make the API usable on servers and VPS without relying on real browsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions