i can't find out how to use roblox api endpoints in game, i have tried a lot of things with no success, such as
local HttpService = game:GetService("HttpService")
local function request()
local response = HttpService:RequestAsync(
{
Url = "https://groups.roblox.com/v1/groups/1",
Method = "Get",
}
)
if response.Success then
print("Status code:", response.StatusCode, response.StatusMessage)
print("Response body:\n", response.Body)
else
print("The request failed:", response.StatusCode, response.StatusMessage)
end
end
local success, message = pcall(request)
if not success then
print("Http Request failed:", message)
end
but it gave me this error: Http Request failed: HttpService is not allowed to access ROBLOX resources. I have tried a lot more but nothing worked. Does anyone know how can i use them inside a game?
