1

I'm developing a YouTube live streaming related program. I know there're APIs to create/list/delete broadcasts and live streams. But all these are assuming that YouTube Live Streaming is already enabled on your account.

I tried to but failed to find any API with which I can use to enable YouTube live streaming on my account. Is there such an API?

1

1 Answer 1

5

As far as I can tell, there is not. As you can see here: https://support.google.com/youtube/answer/2474026?hl=en, in order to create live events on youtube an account must be verified and in good standing.

If you are making the API requests using a YouTube account that fulfills these requirements you can use the YouTube Data API to create liveBroadcasts, otherwise you will likely receive an insufficientPermissions error. This error is detailed here: https://developers.google.com/youtube/v3/live/docs/errors#youtube.liveBroadcasts.insert-insufficientPermissions-liveStreamingNotEnabled-permission.userNotEnabled

One potential way you could tell if an account is able to create live events programmatically would be to call the channels.list() method, and return the status. The status of the channels will have status.longUploadStatus. Long uploads also require an account to be verified and in good standing, so if this value returns allowed you likely have the permissions to work with live events. More details of this can be found in the YouTube Data API documentation.

Let me know if you find information to the contrary.

2
  • 1
    Thanks CptCam, we ended up parsing the response of create live broadcast, checking the reason field for "liveStreamingNotEnabled" to determine if Live Streaming is enabled.
    – rhbc73
    Apr 1, 2015 at 5:24
  • I have hit this error as well, and what I have found is that we still encountered the error that the live streaming is not enabled even with the longUploadsStatus=allowed. So far i think the only way forward with this is to actually try to insert() the broadcast and determine if the permissions are allowed or not.
    – Adam Klein
    Jan 6, 2018 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.