[GH-ISSUE #37] To add brand accounts support #28

Closed
opened 2026-02-27 22:07:38 +03:00 by kerem · 1 comment
Owner

Originally created by @Takoooooo on GitHub (Jul 2, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/37

Youtube Music have brand account,and they have another authentification type.If user wil try to authentificate with brand account to current api version it will cause error.I would like to help a bit to find you solution of this problem.As i understood to authentificate brand users properly you will need to add only "onBehalfOfUser" property to "user" class with proper value.
As i understand they get value of this property from this request,but i dont understand what generates body of this request(i assume it generated by javascript)
image
In next request body already contains this property.And we can find proper onBehalfOfUser value already in response of this request(but mb it also generated by javascript and already known).How to create a brand account you can find by this link https://support.google.com/youtube/answer/1646861?hl=en.
Without onBehalfOfUser property in json it will authentificate to parent account(if you havent created separate brand account,but created just one more channel to existing) or it will throw an exception

Originally created by @Takoooooo on GitHub (Jul 2, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/37 Youtube Music have brand account,and they have another authentification type.If user wil try to authentificate with brand account to current api version it will cause error.I would like to help a bit to find you solution of this problem.As i understood to authentificate brand users properly you will need to add only "onBehalfOfUser" property to "user" class with proper value. As i understand they get value of this property from this request,but i dont understand what generates body of this request(i assume it generated by javascript) ![image](https://user-images.githubusercontent.com/53405089/86351344-cf61bb80-bc6c-11ea-93fb-7339b1e9e5c4.png) In next request body already contains this property.And we can find proper onBehalfOfUser value already in response of this request(but mb it also generated by javascript and already known).How to create a brand account you can find by this link [https://support.google.com/youtube/answer/1646861?hl=en](url). Without onBehalfOfUser property in json it will authentificate to parent account(if you havent created separate brand account,but created just one more channel to existing) or it will throw an exception
kerem closed this issue 2026-02-27 22:07:38 +03:00
Author
Owner

@sigma67 commented on GitHub (Jul 2, 2020):

Brand accounts are supported since 0.7.0: https://github.com/sigma67/ytmusicapi/releases/tag/0.7.0

Documentation is here: https://ytmusicapi.readthedocs.io/en/latest/usage.html#brand-accounts

Let me know if it works for you!

<!-- gh-comment-id:652950069 --> @sigma67 commented on GitHub (Jul 2, 2020): Brand accounts are supported since 0.7.0: https://github.com/sigma67/ytmusicapi/releases/tag/0.7.0 Documentation is here: https://ytmusicapi.readthedocs.io/en/latest/usage.html#brand-accounts Let me know if it works for you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#28
No description provided.