Hello there! I am wondering how I can get the universe ID for a game that I do not own. I am wondering if there is maybe an API endpoint for this? Thanks!
Hi there! Roblox sadly sucks, so there is a very tedious way to do this ):
Here’s a tutorial because it’s 2:00 AM and I don’t wanna type anything out. It involves using the inspect element for the roblox website I think.
Yes,
https://games.roblox.com/docs/index.html
Select Games Api v1
Use the multi-get-place endpoint, you can get universeId by simply using placeId of a place
Also you might have to make the request as an authorised roblox user, but I’ve checked, the user doesn’t need any permissions for the place, so you can check the UniverseId of any place.
This works, but why does it error when attempting to use a proxy?
Most likely because you’re making the request without authentication. You need to create a session with your cookie so that the API sees you as authenticated.
Thanks for the advice! I’m a bit new to using APIs, so could you maybe link me to another post or something that explains how to do this?
the replies here seem to give an explanation
I’m trying to figure out how to recreate this in Roblox Studio. Should I just create a new post? The solution has been found for the original question, I guess.
Thank you so much for the help and support! I’ve found an amazing tutorial on using the Roblox API and it is helping so much!
I don’t know about scripting this, but you can go to create.roblox.com and press the ...
on the game and press Copy Universe ID
:
Thanks for all the help! I was able to finally figure it out… after several hours… LOL! At least those hours were spent gaining experience that was fundamental to the future of my game.
Here’s the final code:
local httpService = game:GetService("HttpService")
local url = "https://games.roproxy.com/v1/games/multiget-place-details?placeIds=".. placeid --url
local headers = {
["Cookie"] = roblosecurity
}
local success, result = pcall(function()
return httpService:GetAsync(url, false, headers)
end)
if success then
local final = httpService:JSONDecode(result)
print(final[1].universeId)
else
warn(result)
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.