Live Subscribers count dont work

Hello, I am doing a subscriber count, but it doesn’t work, the output tells me: HTTP 403 (Forbidden), and I don’t know how to fix it. Does anyone have a solution?

local hs = game:GetService("HttpService") 
local channelID = "UCZNmQXzzzNW9FIDFaN27U4w" -- channel id

--wait(10)
while true do wait(5) 
	local response = hs:GetAsync("https://www.googleapis.com/youtube/v3/channels?part=statistics&id=" .. channelID .. "&key=AIzaSyArYjEl7JITyj231BnBPja71ArDGf7dWFk") -- error
local data = hs:JSONDecode(response)
	script.Parent.SurfaceGui.Amount.Text = tostring(data.items[1].statistics.subscriberCount)
	script.Parent.Total.Value = tostring(data.items[1].statistics.subscriberCount)
end
2 Likes

Is your game published?

30 characters

1 Like

yes, and https requests are on

1 Like

Make sure Allow HTTP requests is enabled. Type: game.HttpService.HttpEnabled = true in command bar

1 Like

Make sure HTTP request is enabled. Also make sure the script isn’t a draft. I don’t see why its not working.

1 Like

I think I know why it is not working. I went to the page the script builds up and this shows:

It seems that the problem is the link has expired or the website has been closed

By the way here’s the link if you want to check it by yourself

1 Like