HttpService: HTTP 403 (Forbidden) Error

Heya Developers! My name is Nico.

So i am currently working/testing things with the HttpService, and i can say that i know the basics, yesterday and this morning everything was working well, until something happened and now every URL i use it says that is “forbidden”.

Here’s an example:

In this script i’m trying to make the value get the text that is insidide the data (URL)
This works perfectly, but the problem is the “forbidden” thingy, anyone knows why and how this happens? and how can i fix it?

Here’s the code i use: (i’m going to hide the URL to prevent problems, ya know what i’m talking about)

while wait() do

local httpService = game:GetService("HttpService")
	local URL = "URL" -- I put my URL here but as i said before i'm gonna hide it to prevent problems
local Data = httpService:GetAsync(URL)
local Announcement = game:GetService("ReplicatedStorage").ANNOUNCEMENT

	Announcement.Value = Data
	
	end

I also have the “Allow http Requests” active.
image

If anyone can help me that would be amazing, have a great day! :pray:

1 Like

You can’t post to discord, without nothing. You either create a plain text using an embed,


local httpService = game:GetService("HttpService")

	local URL = "URL" -- I put my URL here but as i said before i'm gonna hide it to prevent problems
	local Data = httpService:GetAsync(URL)
	local Announcement = game:GetService("ReplicatedStorage").ANNOUNCEMENT
	local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")

while wait() do
	
	RemoteEvent.OnServerEvent:Connect(function()
		local data = {
			["embed"] = {{
				["Title"] = "test",
				["Description"] = Announcement.Value
			}}
		}
		local EncodedData = httpService:JSONEcode(data)
		httpService:PostAsync(url, EncodedData)
end)
2 Likes

Hi! thank you for your answer! i think i didn’t explain what i want to know.
This is the kind of announcement i’m talking about:

But my problem is the “Http forbidden” error, i want to know how can i fix it.

Thank you anyway!

1 Like

Why are you using HTTPSERVICES, for an announcement…?

URL > Webhook URL,
If you want a specific value set to that you do that via a local script making a textbox & a textbutton, and a script inside the frame with them inside.


script.Parent.TextButton.MouseButton1Click:Connect(function()
      game.ReplicatedStorage.ANNOUNCEMENT.Value = script.Parent.TextBox.Text
end)

Elsewise, if you are creating an automatic, announcement system you can do this.

local MessageTable = {"hi","lol"}

while wait(5) do
script.Parent.ANNOUNCEMENT.Text = math.random(MessageTable, #1)
end
2 Likes

What i’m trying to make is a GLOBAL announcement, so i can send a message in every server without update the game (and without shutdown it), i’m also using the http service for other things, like change the time of a live countdown, etc…

You can use MessagingService instead.
Btw where are you sending the request? To discord?

1 Like

If you are looking for something like me, document you.
Also utilize the developer hub for other documentations of that type. ^^

No i’m not sending it to Discord, it’s a global announcement inside my roblox game.

1 Like

Nvm I thought it’s a POST request

1 Like

Thank you so much, but i’m looking for other things, my MAIN problem is about this error i’ve said before, nothing else, just this error, i want to know how to fix it.
image

1 Like

The http 403 response mean that the access to the website is forbidden. Are you sure you don’t need to set any headers like authorization?

Let me explain, so i’ve put a BoolValue in Replicated Storage, i made a LocalScript where the TextLabel text contains the BoolValue text, i’m currently using a page called “Pastebin” where i can edit my code and put the new announcement there, so i’m using the HttpService to get the data of my code in Pastebin. So that announcement should be posted in every single server with no problem, but recently i had this error that doesn’t let me do anything with the httpservice.
image

Where are the URL’s being sent? You don’t have to hand out the actual url itself, but is it to Roblox? Discord? This will most likely tell us the issue!

(Edit: Apologies, missed the url)

what do you mean by “headers”?

Did you set the paste to be private or set it’s password?

Hello, i’m currently using this page to change the annoucement text,

But i had this problem and now i apparently can’t do anything.
image

OK so i’ve got the problem here, i don’t know what is happening, i just wrote the url here and got me the same error.
image

It would be a LOT easier using a table.
Thus being,

local TableMessages = {"hi","releasing soon","announcement?"}

But can that table change in real time? like in every single server without shutdown the server?

Or, an alternative. Firebase, another good way and it’s auto-updated.