Hello there! I am trying to use games.roproxy.com/v1/games/multiget-place-details to get the UniverseID of a place within a Roblox script.
Sadly, attempting to do this requires authenticating (you can see for yourself by going to the link above), which is not something I know how to do in a Roblox script. If anyone can maybe give me some sort of tutorial on how to do this correctly, it’d be amazing.
I am very new to using the Roblox API, but not new to developing on Roblox. I just never had to use the API while scripting until now.
Again; this is not for something outside of Roblox, I am looking for how to do this in a Roblox script, which is why a proxy is needed.
Update: I figured it out out on my own in like 10 minutes after a break to watch Fallout. Thanks, me!
Final code, for anyone wondering:
local httpService = game:GetService("HttpService")
local url = "https://games.roproxy.com/v1/games/multiget-place-details?placeIds=".. placeid --url
local headers = {
["Cookie"] = roblosecurity
} --dictionary of authorization headers
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