HTTP 400 on submitting a log?

  1. What do you want to achieve?

I want to log attendances on my discord server.

  1. What is the issue?

Sup y’all again! I have been trying fix this issue for the last 2 hours, the script I made It’s supposed to submit an embed to my discord showing how many minutes the user has been logged. It submits upon the player unlogs. However, It keeps trowning a HTTP 400 error.

Maybe I’m not seeing something, so that’s why I need feedback.

  1. What solutions have you tried so far?

Changing the locations of the script, etc. I don’t think Discord is blocking Roblox request. It must be the code.

	local Data = {
		["contents"] = {
			["embeds"] = {{
				["type"]= "rich",
				["title"] = "Hosting Ended ",
				["description"] = "TEST",
				["color"] = 006798,
				["thumbnail"] = ""..player.UserId,
	if Player_Name and Time and Login then
		if inuse == false then
			NotifyOn.Value = true
			NotifyM.Value = player.Name.." is now hosting!"
			inuse = true
			PlayerText.Text = "Host: "..player.Name
			Image.Image = ""..player.UserId.."&width=100&height=100&format=png true"
			Time.UI.Text.Text = "0"
			script.Current.Value = player.Name
			Login.UI.Text.Text = "SIGN OUT"
			Count.Disabled = false
			Count1.Disabled = false
			Main_Script.Disabled = false
			Current.Value = player.Name
			NotifyOn.Value = false
			NotifyM.Value = ""
		elseif inuse == true and player.Name == Current.Value then
			inuse = false
			PlayerText.Text = "Nobody is hosting! Last host: "..player.Name
			Time.UI.Text.Text = "0"
			Image.Image = ""
			Count.Disabled = true
			Count1.Disabled = true
		    script.Current.Value = ""
			Login.UI.Text.Text = "SIGN IN"
			Main_Script.Disabled = false
			HTTP:PostAsync(URL, HTTP:JSONEncode(Data))
		    Time.UI.Text.Seconds.Value = 0
		    Time.UI.Text.Minutes.Value = 0

I’ll be always glad for your answers! :smiley:

It’s “content”, not “contents”. Embeds are also a separate field from the content, so I’m not sure why you put that inside content.


You can not have the embeds field inside the content field.

See the solution on this post as a reference. How do you make a discord webhook send an embed message?

1 Like

Thank you so much, I was too blind to notice it.