How to get the likes of a game

Yes, I know there has been dozens of posts like this. I have read through every post but I wasn’t able to accomplish the like counter.

local httpService = game:GetService("HttpService")
local data = httpService:GetAsync("https://games.roblox.com/v1/games/votes?universeIds=ID")
print(data)

This is my current script. But this won’t work because roblox doesn’t allow access to it’s own api.
I’ve tried setting up an api but it didn’t work.

Use a proxy to make the request, a popular public one is roproxy.com, so the link should be:

https://games.roproxy.com/v1/games/votes?universeIds=ID

I’ve tried setting up a roproxy server but I needed to pay 5 dollars for it when I clicked “Deploy on Railway”. Was I looking at the wrong place?

You don’t need to setup any server, it’s public, someone else has done it for you. In general it’s good not to use public proxies when dealing with cookies or sensitive info, but for something as simple as this it’s fine.

local httpService = game:GetService("HttpService")
local data = httpService:GetAsync("https://games.roproxy.com/v1/games/votes?universeIds=ID")
print(data)

But if I use this I get an HTTP 403 (Forbidden) error.

Have you enabled http requests? Have you replaced ID with your universe ID? Are you using a universe id instead of a place one(they’re not the same)? Have you tried using the same endpoint with roblox.com instead of roproxy.com in an incognito window within your browser to see if the proxy is the issue?

This is what the creator of roproxy said:

The /v1/games/…/servers/… endpoints have been disabled as they were being used for tools like RoSearcher. I have no intention of re-enabling them at this time, but feel free to host your own instance of RoProxy Lite

Use this api endpoint: https://games.roproxy.com/v1/games/[UnvireseID]/votes

2 Likes

It works! But I don’t know how to get “upVotes” out of the table.
image

local httpService = game:GetService("HttpService")
local data = httpService:GetAsync("https://games.roproxy.com/v1/games/universeid/votes")
print(data.upVotes) -- prints "nil"
2 Likes

Just use httpService:JSONDecode(data)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.