admin管理员组

文章数量:1305745

I'm using the YouTube Data API to create live broadcasts on behalf of users. My application uses OAuth2 authentication, where users grant permission, and I store their access and refresh tokens to make API calls.

Before creating a new live broadcast, I verify that the user has the necessary permissions by listing their existing live broadcasts via the liveBroadcasts.list endpoint. This works fine for most users.

However, for some users, I get the following error when attempting to insert (liveBroadcasts.insert) a new broadcast:

{
  "message": "Request is not authorized",
  "domain": "youtube.liveBroadcast",
  "reason": "insufficientLivePermissions",
  "extendedHelp": ";
}
  1. Why would a user be able to list their live broadcasts but not create new ones?
  2. Are there additional permissions or account requirements for inserting live broadcasts?
  3. Could this be related to YouTube account types (e.g., brand accounts vs. personal accounts)?
  4. Is there a way to programmatically check whether a user has sufficient permissions before calling liveBroadcasts.insert?

Any insights or workarounds would be appreciated!

Things I’ve checked:

  • OAuth setup: The same OAuth2 flow works fine for most users.
  • Permissions scope: I'm requesting the youtube, youtube.readonly, and youtube.force-ssl scopes.
  • User verification: Listing (liveBroadcasts.list) works, which suggests that the user is authenticated and the tokens are valid.
  • Consistency: The issue occurs only for liveBroadcasts.insert, not liveBroadcasts.list.

本文标签: