Hello!
Currently I got a problem which I used HTTPSerivce to send information of a player speedrun to a discord server. The problem is that it keeps getting a Forbidden error
My solution was to enable http service, enabled third party teleport and make a game public but it still throwing an error “HTTP 403 Forbidden”.
Code:
local webhookurl = webhookurl -- This can be found by going into your discord server settings then going to integrations then going to webhooks
local data = {
["embeds"] = {{
["author"] = {
["name"] = player.Name,
["icon_url"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username="..player.Name
},
["description"] = "Mission Completed",
["color"] = tonumber(0xFFFAFA),
["fields"] = {
{
["name"] = "Time Used :",
["value"] = game.Workspace.TimeUsed.Value,
["inline"] = true
},
{
["name"] = "User ID:",
["value"] = player.UserId,
["inline"] = true
}
}
}},
}
local finaldata = HTTP:JSONEncode(data)
HTTP:PostAsync(webhookurl, finaldata)
I review the code but theres nothing wrong, the error starts on the line
HTTP:PostAsync(webhookurl, finaldata)
Which was a process to send a data to discord webhook
Discord has banned Roblox’s useragent from sending webhooks to their api due to abuse, you should stop using them to log info, if you really want to then use proxies
Alternatively use Guilded which is now owned by Roblox (but still a seperate independent company)
Discord stopped banning Roblox’s UserAgent sometime in 2019 after Roblox updated HTTPService.
Edit: Upon receiving further information, Discord has banned Roblox’s UserAgent again, go figure. Best solution is a proxy or using services for analytics (like Sentry) rather than reporting to a Discord webhook.
To answer the post though:
Discord changed their domain from discordapp.com to discord.com and had announced that old API endpoints would eventually be deprecated. Consider changing discordapp.com to discord.com in your webhookurl.
You also might be sending data to the wrong endpoint or sending the wrong data. Consider reading Discords developer docs for webhooks.
P.S. I recommend editing your post to remove your webhook information and deleting that webhook and creating a new one as you don’t want your webhook keys to be public.
I’d have to test for myself — if they have banned Roblox’s UserAgent again then OP will need to use a proxy to report to Discord webhooks.
Regardless, while it doesn’t suffice as a solution, using analytic services instead is always an option or just creating your own in-game analytics for this data rather than reporting to a Discord webhook.
Also it did work out when i tried on the first time. But most of the time it failed
(so that might be a problem about sending a data) check-here - Discord - Gyazo
I’ve gotten this error before, the simplest thing you can do is change the https://discordapp.com to https://webhook.lewistehminerz.dev. Changing the link really works out for me, and I think it could work out for you too!