Oh yeah, I forgot that. That’s in the original code, I was rewriting this from memory.
Okay, I’ll sort that out once I get back to my computer.
is http requests allowed in game settings
Yes. The error I’m getting is “trust check failed”
Mind if we could talk on discord about it? Axolix#0001
Sure.
Did you test that script in studio? It’ll work in studio because it’s firing from your device, not a Roblox server.
Like other people have said, you have to use a proxy for it to work in an actual server.
You probably ran your code in studio (which has a different UserAgent than live roblox servers) which is probably why it worked. Discord blocked roblox’s UserAgent, not roblox studio’s user agent. You’ll definitely need to use a proxy.
I personally wouldn’t recommend a feedback system from Discord primarily because that’s grounds for potential misusage. There’s the issue of Roblox potentially cracking down on you if you do not filter messages sent to Discord, as well as Discord being unhappy with your use of webhooks.
Your remotes are also relatively insecure. The only thing the client should be sending is text input. The server should be validating (and filtering) text input from the client, then sending it over.
And, to parrot several other people who posted this repeatedly for whatever reason (seriously, only one person needs to say it…), you will need to use a proxy server if you wish to use Discord webhooks, as Roblox’s UserAgent is blocked. The one Quaration replied with should work just fine for your use case (assuming that’s discord.osyr.is, I didn’t check the post).
i get this error when website does not have ssl.
and also i suggest reading this topic it will help you Roblox Discord Webhook Proxy Server
Roblox has recently changed their user-agent so that shouldn’t be the issue (at least it worked a week ago).
Make sure the url you’re passing has http://
or https://
prefix. If it still doesn’t work, try using a proxy like a few people suggested.
Same issue here, but I wasn’t sending a message to discord, I was making a function which checked if an username existed through an user API by sending a request to https://www.roblox.com/UserCheck/DoesUsernameExist?username=EXAMPLE. I got the same error. “Trust check failed”.
That’s because Roblox blocks any HTTP requests to the Roblox website, you’d need to use a proxy service
Oh yes you are right! But ROBLOX should definitely whitelist their APIs.
You can not get any json file data from https://www.roblox.com use proxy to get the file content.
For me heroku
is the best one to use.
Or you can use this proxy link that @Osyris made.
Example code
local HttpService = game:GetService("HttpService");
local Url = "https://discord.osyr.is/api/webhooks/539079934660968495/DbiWa9SHZGPRc_vG8ikruzWcM_rfl2Wj1j9BUydHPnguUv_0HJTYmi-gnWZoZKzg34fg";
local Data= {
username = "vamik64";
content = "From DevForum.";
}
local JSON = HttpService:JSONEncode(Data);
pcall(function()
HttpService:PostAsync(Url,JSON);
end)
Thanks for all your answers, I should be able to try them out later today once I get home. I’ll update it then!
All you have to do is replace discordapp.com
with discord.osyr.is
which is a proxy.
UPDATE
I’m still getting the error. I changed the Discord link to the proxy version.
I solved it! It seems that doing FireServer also takes the first variable of the event (function) as the player firing the event. I just added an extra variable “Player” along with the other two remaining variables. I’m planning on using the Player variable later on anyways!