I would like to be able to display how many Likes/Dislikes on a game without “https error 404”
–
After about 4 hours of searching the devforum, I have not found a solution to “https error 404” related to my problem. When I use the “api.roproxy.com” as a proxy, and I try to fetch the universal ID (shown in the screenshot below), I receive the error “https error 404”
i have tried changing the game id/using another proxy/re writing my script.
ANY AND ALL REPLY ARE GREATLY APPRECIATED AS I AM NEW TO USING API
I TRIED USING A SRIPT FROM A DEVFORUM POST TO SEE IF ANYTHING WOULD CHANGE.
For future reference, you should copy and paste your code instead of screenshotting it as it makes it easier for everyone to change and make modifications.
The reason why you’re getting a 404 error is because the endpoint:
Roblox should honestly lift that restriction. They even promote the use of proxies to access roblox api, so why can’t you just send it directly? Why doesn’t roblox make their own proxy, or why don’t they just remove that restriction? I’m assuming it’s some sort of security measure that they didn’t look back at since.
local httpService = game:GetService('HttpService')
local universeId = "https://apis.roproxy.com/universes/v1/places/12840793936/universe"
local success, result = pcall(function()
return httpService:GetAsync(universeId)
end)
if success then
if result then
local decode = httpService:JSONDecode(result)
local gameVotes = "https://games.roproxy.com/v1/games/votes?universeIds=%.f"
local success2, result2 = pcall(function()
return httpService:GetAsync(gameVotes:format(decode['UniverseId']))
end)
if success2 then
if result2 then
local decode2 = httpService:JSONDecode(result2)
print(decode2)
end
else
warn(result2)
end
end
else
warn(result)
end
From what I read from the main thread for roproxy, the "https://games.roproxy.com/v1/games/votes?universeIds=" endpoint seems to have been disabled by the owner:
So to work around this, you would have to host your own proxy as the reply states. I have very little experience with creating proxies, so I unfortunately can’t help you there, however, there may be some tutorials on the forum to help you with that.
You can use roproxy lite and host it via one of the applications linked below in the main page. Whether or not it will cost money depends on the service you’re using and how many requests are being sent to it (some are free up until you hit a request limit).
This is also written in the Go language, so unless you have experience with that, you may not be able to make any modifications or adjustments as you see fit.
You can also host it from your own device instead, however, you would need to keep your device on 24/7 for it to act as a true server.