The error seems simple but its not … I am trying to get the visits from a UniverseId [since I learned that it can only be obtained from there] but apparently it doesnt work
I have seen the API and other posts:
Im aware that you cannot use roblox’s own proxy to get information from there and rprxy.xyz doesnt work for me
This is my code:
local UniverseUrl = "http://api.roproxy.com/universes/get-universe-containing-place?placeid="..GameId;
local UniverseResponse = HttpService:GetAsync(UniverseUrl);
local UniverseData = HttpService:JSONDecode(UniverseResponse);
if UniverseData.message == "success" then
local Response = HttpService:RequestAsync({
Method = "GET";
Url = string.format("http://games.roproxy.com/v1/games?universeIds="..UniverseData.UniverseId);
});
if Response.Success then
local Body = HttpService:JSONDecode(Response.Body)
local UniverseVisits = Body.data[1].visits;
SurfaceGui.GameVisits.Text = "VISITS: "..UniverseVisits
end
end
Error: HTTP 403 (Forbidden)
Line:
local UniverseResponse = HttpService:GetAsync(UniverseUrl);
I have tried every proxy I have come across and nothing …
My question is:
My code is wrong or there is no way to get visits this way with a proxy
local HttpService = game:GetService("HttpService")
local UniverseUrl = "http://api.roproxy.com/universes/get-universe-containing-place?placeid="..GameId;
local UniverseResponse = HttpService:RequestAsync({
Url = UniverseUrl,
Method = "GET"
});
local UniverseData = HttpService:JSONDecode(UniverseResponse.Body);
if UniverseResponse.Success then
local Response = HttpService:RequestAsync({
Method = "GET";
Url = string.format("http://games.roproxy.com/v1/games?universeIds="..UniverseData.UniverseId);
});
if Response.Success then
local Body = HttpService:JSONDecode(Response.Body)
local UniverseVisits = Body.data[1].visits;
print("VISITS: "..UniverseVisits)
end
end
Also try it on roblox game client instead of roblox studio.