HttpService is not allowed to access ROBLOX resources

I’m trying to make a verification game, keep getting this error:

HttpService is not allowed to access ROBLOX resources

Server Script:

local remotes = game.ReplicatedStorage.Remotes
local http = game:GetService("HttpService")

local serverKey = ""
local requestURL = ""

local function requestCode(userID)
	local res = http:RequestAsync({
		Url = requestURL;
		Method = "POST";
		Headers = {
			["Content-Type"] = "application/json"
		};
		Body = http:JSONEncode({
			["serverKey"] = serverKey;
			["userid"] = userID;
		});
	})
	
	if res.Success then
		local body = http:JSONDecode(res.Body)
		return body.VerificationCode
	end
end

print(requestCode(2362120441))

I’ve removed the serverKey and ip:port for obvious reasons.

i mean the error is kind of self explanatory

1 Like

How is it self explanatory? I’m not accessing roblox resources…

1 Like

You can’t acess URLS from Roblox at all. You need a proxy for that, like this.

Have you enabled HTTP requests in game settings

i mean i dont really know what else to say then, make sure the server you connect to is https/http and that you have httpservice on

2 Likes

Is there anything about the URL you can show us?

2 Likes

It’s connected to an express app via ip:port.

the requestURL is “00.00.00:0000” except replaced with the actual ones.

1 Like

can you curl to your server and tell me if it works, if so what does it say?

1 Like

That was the issue, apologies. I just added http before the ip:port and the error stopped happening.

3 Likes

You might wanna report this to g/@Bug-Support since the message doesn’t seem to be accurate.