Webhook HTTPS Error

Entirely theoretical here.
If one were to use a webhook, could anyone explain why this script might provide an HTTP 400 error? (It is not because it uses discord dot com as a webhook URL.)
Just another very strict clarification, completely all theoretical, I’d like to know why my script isn’t working.

local GradeNew = tostring("Grade"..Grade.."Ping")
	local Data = {
		{
			["content"] = tostring(Settings[GradeNew]),
			["embeds"] = {{
				["thumbnail"] = "https://www.roblox.com/headshot-thumbnail/image?userId="..tostring(Player.UserId).."&width=420&height=420&format=png", 
				["author"] = "Grade-"..Grade.." Log",
				["type"] = "rich",
				["color"] = tonumber(0xffffff),
				["fields"] = {
					{
						["name"] = "**User Information**";
						["value"] = '['..Player.Name .. '](https://www.roblox.com/users/'.. Player.UserId ..'/profile)' .. " | " .. Player.UserId;
						["inline"] = true
					},
					{
						["name"] = "**Game Data**";
						["value"] = "ID:"..tostring(game.GameId).."\nPrivate Server: "..tostring(game.PrivateServerId);
						["inline"] = true
					},
					{
						["name"] = "**Rank**";
						["value"] = tostring(Rank.Value);
						["inline"] = true
					},
					{
						["name"] = "**Command**";
						["value"] = "[<t:"..os.time(os.date("!*t"))..":T>] - `".. Command .."`";
						["inline"] = false
					},
				}
			}
		}}}
	return Data

later on…

local GradeHTTP = Settings[tostring("Grade"..Grade)]
local finaldata = HttpService:JSONEncode(Queery(Player,Rank,cmd,Grade))
HttpService:PostAsync(GradeHTTP, finaldata)

Yet again, purely theoretical.

This is a setting error I believe, if you go to Game Settings → Security → Allow HTTP Request and turn that on, it should work as intended. Let me know if it does.

1 Like

Sorry i wanted to delete this post as you submitted that, it was something to do with the actual structure of the data dictionary.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.