The Problem
Hi there! I want to make a live board that can see how many subscribers a YouTuber does have and set goals for it. So for example: When the YouTube channel hits 100K subs there will be a update, I only want to know if this’s not against the rules at Roblox and if it’s not how I can do it the best way.
Sorry for the late reaction, it toke me a while to figure it out, I only have a new problem right now. When I try the code I get the error “HTTP 403 (Forbidden)”. How do I fix this?
This’ my code:
local httpService = game:GetService("HttpService")
local youtubeId = "id"
while wait(5) do
local youtubeLink = httpService:GetAsync("https://www.googleapis.com/youtube/v3/channels?part=statistics&id="..youtubeId.."&key=AIzaSyD8Mru34qlgyVISGybnidJkqjwr-fzxlsQ")
local dataFromLink = httpService:JSONDecode(youtubeLink)
local subscribers = dataFromLink.items[1].statistics.subscriberCount
script.Parent.Subs.Text = subscribers
end
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
Maybe this is the error:
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
The googleapis website is blocked from being used from Roblox’s HTTPService directly. That is why you are getting the “403 Forbidden” error. Although it is still completely possible to access googleapis.com or any other “forbidden” sites using a proxy.
This thread explains how to set-up a proxy to work with HTTPService on roblox, although it could be hard to wrap your head around it at first, but using a proxy is the only possible way of accessing the api for what you are trying to accomplish.
You just posted your Youtube API key, which means anyone can use your account and potentially create or delete videos without your permission. You should generate a new key and not share it publicly in the future.
Yea you should also delete that key but following on looking up the issue it happens when you don’t have the API activated here is a topic that might help you.
Just a edit you can easily regenerate your key under credentials using the Regenerate Key option.