Guilded chatlogs returning 403

So, I recently switched over to Guilded for chatlogs as Discord now denies the request and everything works fine in studio but in game, I get the error:

HTTP 403 (forbidden)

The code:

local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local webhook = "Insert webhook link here"

Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(msg)
		local data = {
			content = msg;
			username = plr.Name .. " - (#" .. plr.UserId .. ")";
			avatar_url = "http://www.roblox.com/Thumbs/Avatar.a...​"..plr.UserId
		}
		HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
	end)
end)

Has Guilded also blocked webhooks for Roblox or am I doing something wrong?

Probably. You should send the same data to another application to test if it actually works. If it only doesn’t work on Roblox, try a proxy.

1 Like

Depending on the size of your game and how many messages are being sent, the webhook may get blocked by either Discord/Guilded or any proxy service you use. There are some solutions though if you really need to log everything said in chat, though:

  • Have all messages be stored in a table and then send a message “block” to the webhook once enough time has passed or when there’s too many messages in the table. This will prevent you from violating any rate limits depending on the size of your game.
  • Pay for a premium service that is made for logging things on a larger scale

As for answering the question directly: yes, Discord has blocked webhook requests directly from Roblox. This is is because of many developers not respecting the rate limits and using Discord as a logging service when that is not what they intended webhooks to be used for (I assume). They will work from studio because webhook requests sent from studio go directly from your network to Discord. Webhook requests sent from inside an actual Roblox server are sent from Roblox, and are therefore blocked.

2 Likes

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