YouTube API中‘unsupportedSupervisedAccount’授权错误咨询及相关文档查询
unsupportedSupervisedAccount YouTube API Error Let’s break down this under-documented error and what you can do about it:
First, here’s the error context you shared (formatted for clarity):
[ { "message": "Access Forbidden. The authenticated user cannot access this service.", "domain": "youtube.common", "reason": "unsupportedSupervisedAccount", "location": "Authorization", "locationType": "header" } ]
This error is directly tied to supervised YouTube accounts (child/teen accounts managed by a parent/guardian). YouTube restricts access to certain API services for these accounts as part of their safety and digital wellbeing policies—this lines up with the "New safety and digital wellbeing options for younger people on YouTube and YouTube Kids" blog you referenced, even though that post doesn’t dive into technical specifics.
Key Details & Next Steps
- Core cause: Supervised accounts are blocked from using specific YouTube API endpoints (the exact list isn’t publicly documented, but it covers functionality that doesn’t align with YouTube’s family safety guidelines).
- Quick test: If you’re debugging, switch to a regular adult YouTube account to confirm the error disappears—this will confirm the issue is tied to the supervised account type.
- User-facing fix: If your app needs to support supervised users, you’ll need to catch this error and display a clear message explaining that the requested feature isn’t available for supervised accounts. You may also need to adjust your app’s workflow to avoid calling restricted API endpoints when dealing with these accounts.
While this error isn’t listed in the formal YouTube API error documentation, it’s a policy-driven restriction that’s been rolled out to enforce YouTube’s family safety rules.
内容的提问来源于stack exchange,提问作者docwhat

