I sometimes keep recieving this error: HTTP 403 (Forbidden)

Hey everyone,

I have a script that gets a JSON table from Pastebin, and it would do something with a table that is very important for the game, but sometimes when I play my game in a regular server and I check my Server console I keep getting an error saying HTTP 403 (Forbidden)

Here’s my script:

local HttpService = game:GetService("HttpService")
local Data = HttpService:GetAsync("(raw pastebin link)")
local DecodedTable = HttpService:JSONDecode(Data)

I also recieved a HTTP 403 Forbidden error when I was trying to put the Pastebin link.

Do you have Http Requests Enabled?

1 Like

Yes.

wfughdgytfvyuihoiytgyuihioju0y8gui

ok.

It appears that you are decoding data from a Pastebin link using the HttpService to retrieve it as a JSON table. The server is giving a “Forbidden” response, which means that you are not authorized to access the resource at the provided URL, according to the error message “HTTP 403 (Forbidden)”.

Several factors could be to blame for this error:

You may need to enter the proper credentials in order to access the data if the URL you are attempting to access is password- or authentication-protected.

You must ensure that your game is running from an approved IP address or domain if the URL is restricted to specific IP addresses or domains.

You might need to wait until the problem is fixed before you can access the data if the URL is suffering a brief outage or server malfunction.

You could attempt the following to solve the problem:

If there are any limitations on obtaining data from the service, check the Pastebin API documentation or terms of use.

If the issue has any further specifics, look through the server logs or network traffic.

To see if the problem is unique to your game or network, try accessing the URL from a different place or device.

I hope this is useful. If you need any additional help or have any other questions, please let me know.

1 Like

I don’t understand, I am pretty new to scripting and I don’t understand these domain, IP address or connection stuff

Kind of Off topic, But Here is a List of HTTP errors, might help:

Domain: A domain is a particular web address that is used to distinguish an internet server or website. For instance, the domains “google.com” and “roblox.com” correspond to the Google search engine and the Roblox platform, respectively. You must ensure that your game is operating on an authorized domain in order to access a resource if a domain is prohibited from accessing it.

An IP (Internet Protocol) address is a special numerical designation given to each connected device to a computer network that makes use of the Internet Protocol. The host or network interface’s identification and location within the network are the two primary purposes of an IP address. You must ensure that your game is running from an approved IP address in order to access a resource if an IP address is prohibited from accessing it.

Communication between two systems or devices is referred to as a connection. Your game must establish a connection with the hosting server before it can access a resource on the internet.

:grinning:

Okay, so what do I have to do to fix this? Do I have to change anything, or just do something different?

I told you previously 2 replies above how to fix it.

1 Like

Becaus offsite links are not allowed

1 Like

Then how come it sometimes works?

The Whole purpose of HttpService is to get Data from Offsite Links

You aren’t allowed to get Data from Roblox Related Assets.

I found another alternate to Pastebin, it’s a lot better. Thanks for helping though. I will mark @DevCafe_Protector’s solution, since it’s very detail and could help anybody else. Again, thanks!

What alternative are you using? I have a project that also operates like this and I keep on receiving 403’s left and right.

The alternative I used is broken now, and I don’t feel like fixing the problem anyways. Try searching for PasteBin alternatives, thats what I did.

1 Like

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