HttpService: HTTP 403 (Forbidden) Error

I can, but it’s weird… everything was fine this morning, it was working IN studio.

Actually, i have it enabled. it is published tho.
image

Thought i had it there honestly. Alright can you run this code then show the console output?

local HttpService = game:GetService("HttpService")

local function request()
	local response = HttpService:RequestAsync(
		{
			Url = "https://pastebin.com/raw/Ber30YMY",  -- This website helps debug HTTP requests
			Method = "GET",
		}
	)

	if response.Success then
		print("Status code:", response.StatusCode, response.StatusMessage)
		print("Response body:\n", response.Body)
	else
		print("The request failed:", response.StatusCode, response.StatusMessage)
	end
end

local success, message = pcall(request)

if not success then
	print("Http Request failed:", message)
end

Alright, let me test it, i’ll tell you what happens in a few minutes.

1 Like

Damnit.
image

Honestly i think you should transition to MessagingService instead, this is what i meant by it being more reliable and so on.

Even if you won’t use it i have a test game i can show you that sends player’s positions to every other server continuously, using MessagingService. It allows players to see players in other servers!
I would appreciate if you can consider looking at that so you can see why it may be useful in a situation where you need real-time updates.

1 Like

Alright, thank you for your help anyway, ima try to use MessagingService for the announcements, can you teach me more about it please?

Hey there!

Sorry for the late response, I was on a testing account (hence the Bacon in the screenshot).
It seems to be your game, works fine for me! Make sure API is enabled.

Hope I helped!

1 Like

I was also using a Script in ServerScriptService, maybe that’s it.

2 Likes

Yooo, no problem man, so do i need to enable this thing?
image

i enabled it a couple of hours ago and didn’t change anything.

1 Like

This isn’t needed, that is just for datastoreservice etc.

Yes, and try

1 Like

yeah i was using my script there too.

Try a new game, it works fine for me. Dont know what’s up. Check the response body in the dev console. I will be back in 10 mins.

1 Like

What MessagingService does is what it’s name describes, send messages. It allows you to send messages to all servers which can be useful in a lot of ways.

You can see an example i made far up.

(If you want to see just how real-time it is, join this game. One of my accounts is stationed here, you should be able to see where i am even though i am not in your server)
(Link to the game removed, i am reusing the place for something else)

1 Like

Alright, thank you so much!!!

1 Like

Let me join then! after that i’m going to try it.

1 Like

You should make sure you know what you are replying to! Always look through the post first

3 Likes

i joined bro!

I very much see you, not fancy but it does work!

(This can be made better, it is just a quick scrap project i threw together to show you what i meant)