Youtube v3 data API, getting 403 after creating multiple threads

I use the Youtube data API to create live programs. Within an hour, I can create about 5-6 threads, after which I will start to receive the 403 insufficientLivePermissions error. If I wait another 30 minutes and try again, this allows me to make 2 more broadcasts, but then returns 403s again.

I checked if my access token has expired, but it works when executing listing requests. It seems like I'm getting limited speed. However, when I check my Youtube account, all the indicators are green, so I do not believe that I am abusing their API.

This is the response of the YouTube Data v3 API:

 { "error": { "errors": [ { "domain": "youtube.liveBroadcast", "reason": "insufficientLivePermissions", "message": "Request is not authorized", "extendedHelp": "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert#auth_required" } ], "code": 403, "message": "Request is not authorized" } } 

I also don’t get anywhere near the quota limits for the API. Any ideas on why 403 insufficientLivePermissions would be much appreciated!

+5
source share
2 answers

This problem means that you created too many streams on the air: if you go to https://www.youtube.com/my_live_events?action_create_live_event=1 and try to create a new live stream that you will see:

You create too many streams live. Wait a while before creating additional threads.

I think the maximum is set at 6-7 threads per day.

ps: It really is not related to the problem in the documentation (missing areas)

+3
source

Based on this documentation , insufficientLivePermissions error means that the request is not allowed to create a live broadcast.

First, try using the https://www.googleapis.com/auth/youtube.force-ssl area along with https://www.googleapis.com/auth/youtube and see if the 403 error persists.

If not, then I suggest you check out this YouTube Live Streaming API - Understanding Broadcasts and Streams to better understand how broadcasting works.

According to this guide, flow Allows you to transfer audio-video content to YouTube, and also determines how you transfer your content to YouTube. The same stream may be associated with live broadcasts of three .

So, if you want to create a lot of live broadcasts, this guide Using one stream to create simultaneous broadcasts will help you do this.

0
source

Source: https://habr.com/ru/post/1264957/


All Articles