How to Fix 'HttpService is not allowed to access ROBLOX resources'

Last updated:

Quick answer: 'Http requests are not enabled' means HttpService is switched off for your experience: turn on Allow HTTP Requests in Game Settings > Security. 'HttpService is not allowed to access ROBLOX resources' means you tried to call a roblox.com URL, which is blocked, so route it through your own proxy or use the official Roblox API for that data instead.

Two different errors get lumped together here, and they have different fixes.

Check which message you actually have before changing anything.

Fix "Http requests are not enabled"

HttpService is disabled by default. To turn it on:

  1. Publish your place to Roblox if you have not already. The setting is stored per experience.
  2. In Studio, open the Home tab and click Game Settings.
  3. Go to the Security section.
  4. Turn on Allow HTTP Requests.
  5. Click Save.

Then test again. If you are testing in Studio and still see the error, close and reopen the place, since a stale session sometimes keeps the old value. Remember the setting only applies to server scripts. HttpService can't be used from a LocalScript, so a client script that calls it will fail no matter what you enable.

A Correct First Request

Use RequestAsync when you need the status code, and always wrap it in pcall, because any network call can fail:

local HttpService = game:GetService("HttpService")

local function fetchJson(url: string)
    local ok, response = pcall(function()
        return HttpService:RequestAsync({
            Url = url,
            Method = "GET",
            Headers = { ["Accept"] = "application/json" },
        })
    end)

    if not ok then
        warn("Request failed to send:", response)
        return nil
    end

    if not response.Success then
        warn("HTTP", response.StatusCode, response.StatusMessage)
        return nil
    end

    local decoded
    local parsed, err = pcall(function()
        decoded = HttpService:JSONDecode(response.Body)
    end)
    if not parsed then
        warn("Bad JSON:", err)
        return nil
    end

    return decoded
end

local data = fetchJson("https://api.example.com/status")
if data then
    print(data.message)
end

Two details worth noting. pcall catches the case where the request cannot be sent at all (HttpService disabled, no network, bad URL). response.Success covers the case where the server answered but with a 4xx or 5xx status. They are separate failures and you need to handle both. If pcall is new to you, what is pcall in Luau explains it.

Fix "HttpService is not allowed to access ROBLOX resources"

This message appears for any URL on roblox.com, including users.roblox.com, games.roblox.com and apis.roblox.com. Roblox blocks these calls from game servers. Your options:

Use a built-in service instead. A lot of what people try to fetch over HTTP is already available in the engine:

local Players = game:GetService("Players")

-- Instead of calling users.roblox.com
local ok, name = pcall(function()
    return Players:GetNameFromUserIdAsync(1)
end)
print(ok, name)

-- Instead of calling the thumbnails API
local content, isReady = Players:GetUserThumbnailAsync(
    1,
    Enum.ThumbnailType.HeadShot,
    Enum.ThumbnailSize.Size100x100
)

For product info use MarketplaceService:GetProductInfo, and for group data use GroupService.

Use a proxy you control. If you truly need data the engine does not expose, run a small server (a Cloudflare Worker or any hosted function) that calls the Roblox API and returns the result. Your game then calls your server's URL. Keep your own API key on that server, never inside the Roblox script.

Other Problems That Look Similar

Common Mistakes

If your problem is saving player data rather than calling a web API, the error is probably from DataStoreService, not HttpService. See fixing the DataStore 403 error for that case.

Keep Learning

Handling failure paths is a core Luau skill, not an advanced one. The Luablox lessons cover error handling with pcall, and the theory reference explains how yielding calls work.

Frequently asked questions

Where is the Allow HTTP Requests setting?

Open the place in Studio, go to Home > Game Settings > Security, turn on Allow HTTP Requests and save. The setting belongs to the published experience, so publish the place first if it is not published yet.

Can I call roblox.com APIs with HttpService?

No. Requests to roblox.com and related domains are blocked from game servers and return 'HttpService is not allowed to access ROBLOX resources'. Use built-in services like Players, MarketplaceService or GroupService, or call your own proxy server that talks to the Roblox API.

Can I use HttpService in a LocalScript?

No. HttpService only works from server-side Scripts. If a client needs data from a web API, have it ask the server through a RemoteFunction or RemoteEvent and let the server make the request.

Why does my request work in Studio but fail in the live game?

The Allow HTTP Requests setting is stored on the published experience. If you only changed it on an unpublished local copy, or your remote server blocks traffic from Roblox servers, the request works in one environment and fails in the other. Verify the setting and test your API from outside Roblox.

Learn core Roblox scripting and Luau programming concepts, including: http requests are not enabled, httpservice is not allowed to access roblox resources, roblox httpservice enable, roblox enable http requests, httpservice requestasync.

Related pages