Conversation
Brand accounts require the X-Goog-AuthUser header to be sent with API requests. This change: - Adds auth_user field to YoutubeMusicInstance struct - Reads X-Goog-AuthUser from headers.txt in from_header_file() - Includes X-Goog-AuthUser header in browse_raw and browse_continuation_raw API requests - Updates README with documentation for brand account setup Fixes ccgauche#106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
|
Thanks for the contribution. Just why aren't you just propagating the headers through the HeadMap further ? |
ccgauche
reviewed
Jan 19, 2026
| } | ||
| } | ||
| // Read x-goog-authuser from headers file | ||
| let headers_content = tokio::fs::read_to_string(path) |
Owner
There was a problem hiding this comment.
Here you are parsing the file again after having skipped the x-ggog-authuser but in reality you can just add a match case next to cookie and user-agent for it to be propagated.
Owner
|
I was pretty sure it was also supported and it is: |
Contributor
|
I always used my branded account and I did not have any issue apart from refreshing the cookies sometimes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, found an issue when using a brand account where no playlists would show up. Removing the account_id (i.e. going back to the main account) worked fine however.
After some digging it turns out we're missing a header. This PR just adds support for passing that header through. Have tested this locally and brand accounts work correctly for me now.
Summary
X-Goog-AuthUserheader to API requestsauth_userfield toYoutubeMusicInstancestructX-Goog-AuthUserfromheaders.txtinfrom_header_file()browse_rawandbrowse_continuation_rawAPI requestsTest plan
X-Goog-AuthUserheader for non-brand accountsFixes #106
🤖 Generated with Claude Code