What I want to do
- Let my Google account (YouTube account) be
example@gmail.com
- And I usually use the brand account
example2
to watch YouTube videos - I have a membership to my favorite channel FooBar on my
example2
account
I would like to get the YouTube member-only video comment and caption data for this FooBar channel from the API.
What I did
I implemented a YouTube API call script using OAuth authorization.
When granting OAuth authorization, you have two choices: whether to choose a Google account or a brand account.
- (1) Google account:
example@gmail.com
- (2) Brand account:
example2
YouTube
I was able to retrieve comments on members-only videos, but to do so I had to use an access token obtained by granting OAuth authorization to the brand account.
However, without caption editing privileges on the FooBar channel, caption data cannot be obtained from the captions API. I tried to get the FooBar channel to grant me caption-editing privileges, but it seemed that the only account to be granted such privileges was my Google account and I could not specify a brand account.
The resulting situation was as follows:
OAuth account | commentThreads / comments API | captions API |
---|---|---|
Google account example@gmail.com | ⚠️ I can get public videos only | ⚠️ I can get public videos only |
Brand account example2 | ⭕️ I can get public and member-only videos | ❌️ I cannot get captions |
If I use the example2
account, I get a 403 forbidden when I try to retrieve the caption.
{"error": {"code": 403,"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.","errors": [ {"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.","domain": "youtube.caption","reason": "forbidden","location": "id","locationType": "parameter" } ] }}
Questions
- (1) Can I get caption data for members-only videos on other people's channels from the YouTube API?
- (2) How do I get caption data from the captions API for my YouTube brand account? Or How do I get access to members-only videos in my Google Account?
- (3) Do you have any advice on this case?
Information on how channel owners can authorize users (i.e. me) from YouTube Studio (for Google accounts or branded accounts) and which permissions apply with which accounts when OAuth authorization is used I am having trouble finding this information.
Any information you can give us would be helpful.