local ProxyService = require(game:GetService('ServerScriptService').ProxyService)
local Proxy = ProxyService:New('') --removed the key, shouldn't change anything
local body = Proxy:Get('https://api.roblox.com/universes/get-universe-containing-place?placeid=402122991').body
print (body)
print (body.UniverseId)
You’re forgetting to Decode the JSON, You need to use HttpService:JSONDecode on the Body
local HttpService = game:GetService("HttpService")
local ProxyService = require(game:GetService('ServerScriptService').ProxyService)
local Proxy = ProxyService:New('') --removed the key, shouldn't change anything
local body = HttpService:JSONDecode(Proxy:Get('https://api.roblox.com/universes/get-universe-containing-place?placeid=402122991').body)
print (body)
print (body.UniverseId)
Although can’t you just use HttpService immediately?
local HttpService = game:GetService("HttpService")
local body = HttpService:JSONDecode(HttpService:GetAsync('https://api.rprxy.xyz/universes/get-universe-containing-place?placeid=402122991'))
print (body)
print (body.UniverseId)
rprxy.xyz is required instead of roblox.com since you can’t use Roblox.com apis using Roblox itself, rprxy.xyz is just a proxy
local ProxyService = require(game:GetService('ServerScriptService').ProxyService)
local Proxy = ProxyService:New('')
local body = Proxy:Get('https://api.roblox.com/universes/get-universe-containing-place?placeid=402122991')
body = game.HttpService:JSONDecode(body)
print (body)
print (body.body.UniverseId)
local ProxyService = require(game:GetService('ServerScriptService').ProxyService)
local Proxy = ProxyService:New('')
local body = Proxy:Get('https://api.roblox.com/universes/get-universe-containing-place?placeid=402122991')
body = game:GetService("HttpService"):JSONDecode(body.body)
print(body)
print(body.UniverseId)