Help with http 401 out of nowhere and roproxy

my function suddenly stopped working and throws a http 401 unauthorized error, i don’t know if the roproxy is not working or what is wrong with the code, it worked well and got it back from old versions it says the same thing maybe a roblox bug.

stopped working days ago still no fix

function getwhimg(imgID)
	local httpService = game:GetService("HttpService")
	local PNG = httpService:GetAsync("https://assetdelivery.roproxy.com/v1/asset?id="..GetImgID(imgID))

	local function parseBigEndian(str, index)
		local b1, b2, b3, b4 = string.byte(str, index, index + 3)
		return ((b1 * 256 + b2) * 256 + b3) * 256 + b4
	end

	local pngSignature = "\137PNG\r\n\26\n"
	if PNG:sub(1, 8) ~= pngSignature then
		warn("Invalid PNG signature")
	else
		local chunkType = PNG:sub(13, 16)
		if chunkType ~= "IHDR" then
			warn("IHDR chunk not found in PNG")
		else
			local width = parseBigEndian(PNG, 17)
			local height = parseBigEndian(PNG, 21)
			print("Parsed PNG Dimensions: Width =", width, "Height =", height)
			return width,height
		end
	end
end

image
image

go to settings > security > Allow HTTP Requests


(im not sure if it will work)

i arleady turn on http request before and like i said it was working all well then randomly stops working

check it again maybe you turned it off by accident

i turned it off and on again just right now and still the same

The 401 error you are receiving is because requests to asset delivery now need to contain authorization, which in this case would mean you need to send a login cookie with your request. I would strongly advise against doing so when using a public proxy.

See this thread for more information:
https://devforum.roblox.com/t/creator-action-required-new-asset-delivery-api-endpoints-for-community-tools/3574403

2 Likes