Webhook only works on studio

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I was doing some kind of testing with webhooks, but when i tried the webhook on the experience it does not work, only on studio.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I tried turning on the http request, but that didn’t change anything. also, while trying to look for errors, nothing was on the console.

local HttpService = game:GetService('HttpService')

local function GetINFO(Web)
       local Response
       local Success, Error = pcall(function()

       Response = HttpsService:GetAsync(Web)
       end)
      
       if not Success then
          error('something went wrong')
       end

       local JSON
       local Success, Error = pcall(function()
              JSON = HttpService:JSONDecode(Response)
       end)

       if not Success then
          error('something went wrong')
       end

       return JSON
end

local function RequestForBasketball(Web, Data)
         local JSON = HttpService:JSONEncode(data)

         local Options = {
            Url = Web,
            Method = 'POST'
            Headers = {
                ['Content-Type'] = 'application/json'
           },
           Body = JSON
          }

          local Response
          local Success, Error = pcall(function()

              Response = HttpService:RequestAsync(Options)
          end)

          if not Success then
             error('something went wrong')
         end

         return Response
end

...

1 Like

I’m assuming you’re trying to send information to a Discord webhook? Discord banned Roblox from sending information through webhooks because people were spamming them (intentionally or unintentionally), so you will have to use a proxy to bypass this

Don’t send info to Discord webhooks, people get Terminated for doing that.

I think it also depends on what exactly you’re trying to send through the webhook and how fast they are sent in a minute. If you place a webhook that logs people joining/leaving and you have a big game, the webhook may constantly pass the ratelimits and possibly get the webhook’s creator banned

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