So i am make a game for i YouTube video i am creating. And i want to make a board that can see how many subscribers i have.
Do you uave to use a proxy like ropoxy or can you access it straight from a script using Httpserivce.?
So i am make a game for i YouTube video i am creating. And i want to make a board that can see how many subscribers i have.
Do you uave to use a proxy like ropoxy or can you access it straight from a script using Httpserivce.?
roproxy is when the service blocks roblox http requests and the proxy can bypass it, so only use it for roblox/discord requests
for everything else you use just httpservice
I just realized i had a a miss spell but ok thank you, do you know how to do it? Otherwise ill do some research
You’ll most likely have to obtain an API key from Google/YouTube
just google youtube api for subcriber count
the company always has documentation on how to use their api
You can access a YouTube subscriber count using the YouTube Data API. You can obtain an API key from the Google Cloud Console. The YouTube API provides a free quota of 10,000 units per day, with each subscriber count request costing 1 unit. There is no fee for the API key itself, but if you exceed the free quota, you will need to pay for additional usage.
If you plan to use the API for commercial purposes, such as in a monetized Roblox game, you may need additional permissions per Google’s API Terms of Service.
--best guess, not tested
local HttpService = game:GetService("HttpService")
local API_KEY = "YOUR_API_KEY"
local CHANNEL_ID = "CHANNEL_ID"
local URL = "https://www.googleapis.com/youtube/v3/channels?part=statistics&id=" .. CHANNEL_ID .. "&key=" .. API_KEY
local success, response = pcall(function()
return HttpService:GetAsync(URL)
end)
if success then
local data = HttpService:JSONDecode(response)
if data.items and data.items[1] and data.items[1].statistics then
print("Subscribers: " .. data.items[1].statistics.subscriberCount)
end
else
print("Failed to fetch data")
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.