API quota reaches end quickly #2

Closed
opened 2025-10-29 13:19:12 +01:00 by ramforth · 2 comments
Owner

The constant calls to the YT API can cause an exhaustion of the allowed asks.

An HTTP error 403 occurred: b'{\n  "error": {\n    "code": 403,\n    "message":
"The request cannot be completed because you have exceeded your \\u003ca
href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n
"errors": [\n      {\n        "message": "The request cannot be completed because
you have exceeded your \\u003ca
href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n
"domain": "youtube.quota",\n        "reason": "quotaExceeded"\n      }\n    ]\n
}\n}\n'
Could not find an active live chat for the given video ID.
The constant calls to the YT API can cause an exhaustion of the allowed asks. ``` An HTTP error 403 occurred: b'{\n "error": {\n "code": 403,\n "message": "The request cannot be completed because you have exceeded your \\u003ca href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n "errors": [\n {\n "message": "The request cannot be completed because you have exceeded your \\u003ca href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n "domain": "youtube.quota",\n "reason": "quotaExceeded"\n }\n ]\n }\n}\n' Could not find an active live chat for the given video ID. ```
Author
Owner

This is an API restriction that we are hard pressed to overcome in the current iteration of the script.
Because we as small, normal people, only can access the public API - we see heavy restrictions to the number of calls we can make pr day. And with good reason.
You can research the reasons on your own.

The main thing is that we either have to introduce a latency and poll the API only e.g 5 - 10 seconds. Which introduces further latency between viewer and streamer (something we want to avoid).

There is a workaround, perhaps, in using i.e StreamElements' API to push messages to the terminal rather than pull them through the YT API.
I will investigate this further.

This is an API restriction that we are hard pressed to overcome in the current iteration of the script. Because we as small, normal people, only can access the public API - we see heavy restrictions to the number of calls we can make pr day. And with good reason. You can research the reasons on your own. The main thing is that we either have to introduce a latency and poll the API only e.g 5 - 10 seconds. Which introduces further latency between viewer and streamer (something we want to avoid). There is a workaround, perhaps, in using i.e StreamElements' API to push messages to the terminal rather than pull them through the YT API. I will investigate this further.
ramforth added reference main 2025-10-29 13:42:48 +01:00
ramforth added the
enhancement
label 2025-10-29 13:43:01 +01:00
ramforth pinned this 2025-10-29 13:43:10 +01:00
Author
Owner

The project has been rewritten to work with pytchat over the API polling that caused issues.
See youtube-chat-webhook-v2

The project has been rewritten to work with pytchat over the API polling that caused issues. See [youtube-chat-webhook-v2](https://gitea.ramforth.net/ramforth/youtube-chat-webhook-v2)
Sign in to join this conversation.
No description provided.