Http 400 (bad request)?

I’m trying to send data to discord using httpservice but it keeps giving me this error.
(I removed the webhook for obvious reasons.)
Code:

local event = game.ReplicatedStorage.RemoteEvent
local http = game:GetService(“HttpService”)

local URL = “”

local function postToDiscord(Message)
local data = {[“Content”] = Message

}

data = http:JSONEncode(data)
http:PostAsync(URL, data)

end

event.OnServerEvent:Connect(function(plr, text)
postToDiscord(text)
end)

1 Like

Discord likes to block post requests from roblox. It might be a shameless plug, but replace the discord.com in the url for rezokar.xyz and see if it works. Also, I believe content may need to be lowercase.

1 Like