I have a bot for youtube that I turn on when I stream. According to the LiveMessage documentation part of the response is how long to wait before the bot requests the list again.
Usually this value is slightly over 1000. If the bot pings the server for a list of messages once every second and a list call is 5 quota(s) and I stream for an hour and a half, I would use 27000 quota. Over double the limit.
Of course, I might be polling youtube incorrectly. Here is what I am doing.
- Send a GET request to
https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId={LiveChatId}&part=id,authordetails,snippet&access_token={MyAccessToken} - Save
pollingIntervalMillis, andnextPageToken Task.Delay(MillisecondsToWait)- Make a GET request to
https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId={LiveChatId}&part=id,authordetails,snippet&access_token={MyAccessToken}&pageToken={nextPageToken} - Repeat steps 2-4 until the response has the attribute offlineAt
Looking at the Java sample this approach is correct. Just, that the Java example uses a youtube object.
How am I supposed to stay under the 10K limit if I use 5 quota points every second?