Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i use roblox api endpoints in game?

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?

1 answer

Everyone who is reading this, i found out that roblox does not allow http service to access any roblox link(website) so i will just use a third party one

This discussion is preserved as it was. New answers, comments, and votes are closed.