#error: Failed to fetch data from Roblox API: HttpService is not allowed to access ROBLOX resources

49 messages · Page 1 of 1 (latest)

sly onyx
#

@graceful swift can you help me?

marble geyser
#

here

#

igu

sly onyx
marble geyser
#

you have to use

#

a proxy server

sly onyx
marble geyser
#

roproxy

sly onyx
#

isn't this a violation?

marble geyser
#

no

sly onyx
# marble geyser no
Using a proxy server to bypass restrictions on making HTTP requests to Roblox resources is a violation of the Roblox Terms of Use and may result in account suspension or other penalties.
#

okey...

marble geyser
#

http request

#

roblox resources

#

thats what we arent doing

#

um wait

#

nvm

#

scratch that

sly onyx
#

pls?

marble geyser
#

u cant

#

i forgor

#

If your game is part of a universe, you can leverage Roblox's MessagingService to send requests to another experience within your universe that can access the Roblox API directly?

#

Set up your own external server (using Node.js, Python, or another language) that can securely access the Roblox API?

#

i dont know much on this

#

cause i dont do this

#

but those are the only methods i know

sly onyx
marble geyser
#

so like

#

you have to set up a messagingservice to another experience since that other experience isnt online u cant get roblox apis from that

sly onyx
# marble geyser so like
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = Instance.new("RemoteEvent")
RemoteEvent.Name = "UserInputEvent"
RemoteEvent.Parent = ReplicatedStorage

local PROXY_URL = "https://roproxy-production-f7a2.up.railway.app"

local function getUserIdFromUsername(username)
    local success, result = pcall(function()
        return Players:GetUserIdFromNameAsync(username)
    end)

    if success then
        return result
    else
        warn("Failed to get user ID for username '" .. username .. "': " .. tostring(result))
        return nil
    end
end

RemoteEvent.OnServerEvent:Connect(function(player, username)
    local targetUserId = getUserIdFromUsername(username)

    if targetUserId then
        local url = string.format('/v1/users/%s', targetUserId)
        local proxyUrl = PROXY_URL .. url

        local success, response = pcall(function()
            return HttpService:GetAsync(proxyUrl)
        end)

        if success then
            local data = HttpService:JSONDecode(response)
            local createdTime = DateTime.fromIsoDate(data.created).UnixTimestamp
            local currentTime = DateTime.now().UnixTimestamp
            local accountAgeDays = (currentTime - createdTime) / 86400

            RemoteEvent:FireClient(player, string.format("%.2f days", accountAgeDays))
        else
            warn("Failed to fetch data from proxy server: " .. tostring(response))
            RemoteEvent:FireClient(player, "Failed to fetch data from proxy server")
        end
    else
        RemoteEvent:FireClient(player, "Invalid username")
    end
end)
```Failed to fetch data from proxy server: HTTP 500 (Internal Server Error)
sly onyx
sly onyx
sly onyx
marble geyser
#

yea i said wait\

sly onyx
#

okey

sly onyx
main quarry
#

did

#

u enable

#

http

#

requests

#

from game settings?