Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I get Http/1.1 403 Forbidden error, please, I need help immediately. ?

Asked by
RiotGUI 15
6 years ago

I'm making a GUI for my game that logs people who has a certain gamepass

I'm 100% sure HttpService is enabled.

It works fine in Studio but not IN-GAME.

And I get the mentioned error above.

game.Players.PlayerAdded:Connect(function(plr)
local url = "https://discordapp.com/api/webhooks/428316951203282944/tplVZ5o5-jJy6PeiLHcbyrysVgeVWSzJ6sthaopmQ"
local url1 = "https://discordapp.com/api/webhooks/428359706168524802/-7NznC2BsqqcLw39OeqBYnfS6D2DfhMLjvA_pnoLL3ebIiX"
local url2 = "https://discordapp.com/api/webhooks/428360067570728965/QSFQ0vu5-j1Lix4QfOqyBz6lwlC_qHi"
local http = game:GetService("HttpService")


-- Whitelist
if game:GetService("GamePassService"):PlayerHasPass(plr, 156993) or plr.Name == "RiotGUI" then
local HookData1 = {
['avatar_url'] = "https://media.discordapp.net/attachments/3668633236/428316404547059715/test2.png",
['username'] = "Riot Gui",
['content'] = plr.Name .. " is Whitelisted! :flag_white: :flag_white:" 
}
HookData1 = http:JSONEncode(HookData1)
http:PostAsync(url, HookData1)
end



-- Elite
if game:GetService("GamePassService"):PlayerHasPass(plr, 152916) or plr.Name == "RiotGUI" then
local HookData3 = {
['avatar_url'] = "https://media.discssordapp.net/attachments/36ss633236/428315928418058250/tes2.png",
['username'] = "Riot Gui",
['content'] = plr.Name .. " owns Elite! :crown: :crown: " 
}
HookData3 = http:JSONEncode(HookData3)
http:PostAsync(url2, HookData3)
end



-- VIP
if game:GetService("GamePassService"):PlayerHasPass(plr, 15538) or plr.Name == "RiotGUI" then
local HookData2 = {
['avatar_url'] = "https://media.discordapp.net/attachments/36635018633236/42861864982/te1st.png",
['username'] = "Riot Gui",
['content'] = plr.Name .. " owns VIP! :dark_sunglasses: :dark_sunglasses: "
}
HookData2 = http:JSONEncode(HookData2)
http:PostAsync(url1, HookData2)
end
end)

(I meant to mess the webhook links for security reasons.)

1 answer

Log in to vote
0
Answered by
oreoollie 649 Moderation Voter
6 years ago
Edited 6 years ago

Roblox blocked using HTTP service with discord webhooks. But there is a very popular proxy to get around this. Just replace "discordapp.com" with "discord.osyr.is".

Also, dont post code containing discord webhook ids. If you're going to you need to censor the numbers.

0
^ LoganboyInCO 150 — 5y
Ad

Answer this question