HTTP 404 (Not Found)

It keeps erroring HTTP 404 (Not Found).
Why? Does this mean the UserId of the play doesn’t exist or something?
Edit: this is the new script, it worked ONCE, and now just doesn’t work, I didn’t change anything? Can someone help me? It prints “it worked”

local apiBase = "https://roblox.rocketpanel.io/roblox/bots"

local function http(loaderId, endpoint, method, body)
	if (body) then
		body = HttpService:JSONEncode(body)
	end

	local success, message = pcall(function()
		local newURL = apiBase .. '/' .. loaderId .. endpoint

		local Response = HttpService:RequestAsync({
			Url = newURL,
			Method = method,
			Headers = {
				["Content-Type"] = "application/json"  -- When sending JSON, set this!
			},
			Body = body
		});

		return HttpService:JSONDecode(Response.Body)
	end)
	

	if (not success) then
		return {success = false, response = message}
	else
		print(message, ' it worked!')
		return message;
	end
end

		local loaderid = "loaderid goes here"
		local endpoint = "rankingroup"
		local method = "POST"
		local body = {["userId"] = playerToBeRanked.UserId, ["rankId"] = RoleId}
		http(loaderid, endpoint, method, body)

It means the requested page couldn’t be found. Double check the HTTP URL

1 Like

So it seems I missed a “/”

Now it gave me HTTP 400 (Bad Request) Error.

That means the server couldn’t understand your request, it was incomplete, or corrupted. Try seeing if there’s anything from the HTTPService you missed

I’m not getting errors anymore. The bot just doesn’t rank up the members.

so it fails… but it doesnt give a reason? it worked once, but what?