Hey! If you remember, I made a post about this a while ago. But now the API that ive been using is deprecated and no longer usable. I’m still new to API’s and I would need an answer and an explanation on how it works.
local HTTP = game:GetService("HttpService")
local gameRequest = "https://apis.roblox.com/universes/v1/places/[PLACEID]/universe"
local success2, result2 = pcall(function()
return HTTP:GetAsync(gameRequest)
end)
if success2 then
UniverseID = HTTP:JSONDecode(result2).data[1].universeid
print(UniverseID)
end
-- no output!!
Edit: the API url you provided is still working. Anyways, you can use this method:
local HTTP = game:GetService("HttpService")
local RequestBaseURL= "https://games.[Proxy Website's Second Level Domain].com/v1/games/multiget-place-details?placeIds="
local function GetPlacesDetails(IntegerArray: {number})
assert(typeof(IntegerArray) == "table")
local RequestPlaces = ""
for index, PlaceId in ipairs(IntegerArray) do
RequestedData = string.format("%s&placeIds=%s", RequestPlaces, PlaceId)
end
local RequestURL = RequestBaseURL .. RequestPlaces
local Success, Response = pcall(function()
return HTTP:GetAsync(RequestURL)
end)
if Success then
return HTTP:JSONDecode(Response)
else return nil end
end
Im tryna find an API that doesn’t require a verification or a cookie. Maybe we can try this again?
local HTTP = game:GetService("HttpService")
local gameRequest = "https://apis.roblox.com/universes/v1/places/[PLACEID]/universe"
local success2, result2 = pcall(function()
return HTTP:GetAsync(gameRequest)
end)
if success2 then
UniverseID = HTTP:JSONDecode(result2).data[1].universeid
print(UniverseID)
end
yeah, the data im trying to get doesn’t work. I don’t know if I scripted it correctly. I know the API works but but I just cant get the universe id. I think it might have to do with
No no…
I mean, you can’t send requests to the roblox domain from the studio neither from a published game, you’d have to use a proxy website to make these requests…