local data = {
['WebhookURL'] = 'https://discord.com/channels/959278678393634908/959278678393634912',
['WebhookData'] = {['username']='itchybarn', ['content']='Hello!'}
}
local https = game:GetService('HttpService')
local data = https:JSONEncode(data)
print('dfs')
local success,errorm = pcall(function()
https:PostAsync('https://bloxrank.net/api/webhook/', data, Enum.HttpContentType.ApplicationJson)
end)
Discord has blocked Roblox from sending API requests to it, so it may just be because you are directly calling discord instead of a proxy service. Iâm not sure if they removed the block however.
EDIT: Upon looking at your code it seems the webhook is invalid. Itâs just a link to a server channel. Iâd suggest looking at how to create a webhook, here.
I keep getting HttpError: DnsResolve. I tried the code directly from the topic even, and I double checked the webhooks URL and my discord webhook URL.
Any reason I keep hitting this error? Iâve spent about an hour reformatting and trying different proxies like this one. Any help is seriously appreciated.
The code Iâm using to test (directly used from the example):
This doesnât work for me, it says HTTP 403 forbidden?
My script:
local data = {
['WebhookURL'] = 'https://discord.com/api/webhooks/thisisnthereonpurposeyouarentwebhookbombingmyserver:)',
['WebhookData'] = {['username']='hookguy', ['content']='Hello!'}
}
local https = game:GetService('HttpService')
local data = https:JSONEncode(data)
local success,errorm = pcall(function()
https:PostAsync('https://bloxrank.net/api/webhook/', data, Enum.HttpContentType.ApplicationJson)
end)
print(success,errorm)