HTTP 400(Bad Request)

Is the ROBLOX API down or something? It keeps saying HTTP 400(Bad Request)
NOTE: Please help, been at this for 2 days.

Code:

local HttpServ = game:GetService('HttpService')
	
	local url2 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

local data2 = 
    {
		        ["content"] = "",
        ["embeds"] = {{
            ["title"] = "Console Ban",
            ["description"] = "Name of Player "..guy.Name,
            ["type"] = "rich",
            ["color"] = tonumber(0xff0000),
            ["fields"] = {
                {
                    ["name"] = "Admin",
                    ["value"] = plr.Name,
                    ["inline"] = true
                },
                {
                    ["name"] = "Reason",
                    ["value"] = reason,
                    ["inline"] = true
					                },
					 {
                    ["name"] = "yes",
                    ["value"] = "e",
                    ["inline"] = true
            }
        }}
		    }}
    local newdata = HttpServ:JSONEncode(data2)
    HttpServ:PostAsync(url2, newdata)

Can you leave us a script? API is not down.

1 Like

Edited the post, hope it helps.

did you enable studio access to api services

and sometimes i just put my game public, test it then make it back to private and for some reasons it works

thanks, my game is currently on friends only

is the url an actual link or if it’s just all X’s why would it work

api services and http services dont work for me until i set my game public and publish it

did it work?

30 characters requirement

i deleted my webhook because i dont want anyone to have it, on the script there is my webhook.

havent tried yet

30 characters requirement

If it’s a discord webhook, then it will always return HTTP 400 because roblox banned discord webhooks from being used.

2 Likes

What constitutes to ‘earlier’? I myself have tried using post requests to a discord webhook around two months ago and have gotten the same HTTP 400 error.

The devforum is also littered with posts as early as 2018 with people reporting that using discord webhooks in conjunction with HTTPService will return the aforementioned error.

1 Like

Discord doesn’t block direct post requests from roblox. They had a period of time where they did though from people abusing the post rate, but it still works. I just tested it to be sure a few minutes ago and it went through properly and didn’t get any errors.