Is there possible to get from which game a request was sent

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

  1. What do you want to achieve? I want to know if you can get from which game a HTTP request was sent, like that if when doing a HTTP request using HTTP service there’s like a SentFromPlaceId Header or something like that or that it’s included in the User Agent that can’t be spoofed.

  2. What is the issue? Basically I’m making a tool to share animations stored on my website’s server, won’t go in detail on how it’s made but I want to make a rate limiting for each roblox place cause to play the animations you first get the animation instruction (like this part move here at this time) from the servers.

  3. What solutions have you tried so far? Not really anything

Any help would be appreciated.

3 Likes

You would add the game ID in the HTTP GET method string. Something like this:

https://www.somedomain.com/some/path/to/file?id=39384485&param1=value1&param2=value2

In your web server script, you would look for the variable id from the GET method to get the game ID the request was sent. You can get the game ID from the game itself by reading the value of the game.GameId property.

2 Likes

Yeah I could to that, like I send two things in request body

{
    DynamicAnimationId = "animation_id",
    Game_Id = game.GameId
}

However the user can change the Game_Id in order to bypass rate limitings

1 Like

I do not believe that the HttpService provides any game in headers when sending requests, so you will just have to trust them. You don’t really have any other choice. Though, if it is your server, you may be able to check the IP and rate limit that IP so that at least the game server will be rate limited.

I have access to IP address on my Website’s servers but are the request using HTTP service sent from the player’s device or the a roblox server? Like from the server of the game or a random server each time?

I am unsure as to where they are sent from. I may be wrong, but I believe they are sent from your computer when testing on a local server in studio. This leads me to believe that they are sent from the game server.

1 Like

Do you mean the client? HTTP requests cannot be sent from the client. That would be a major security issue because then you could associate the player with their IP address at the web server. HTTP requests can only be made from the server.

By client I meant the user’s computer like are HTTP request using HTTP service sent from the roblox server dedicated to running the instance of the game or the user’s PC or a random roblox server?

I would assume that it is from the same server running the game, however, even if it is another server sending the request, you could use use som kind of verifikation in the request, Using the games jobID as idenifier and som kinde of password used as auth

1 Like

I am assuming that you have control over both the game server and the web server. If that’s the case, you could probably do a system where the game server sends the GameId, PlaceId, and JobId as a request for a token from the web server. After that, use the token and the JobId for subsequent requests. The token expires after say…12 hours or so. After that, if that JobId is still live, a new token will need to be issued.

Well I don’t really control the game server since this will be a public tool maybe I could make it so to get animations you need to put your account credentials (an account on my website not roblox) in order to make a rate limiting per account.

Yeah auth might the best solution.

So animations are actual Roblox animations? I thought that you have to upload them through Studio? Can the game server process the animations on the fly like that?

No no it’s not actual roblox animation, and the game can’t process them without a module that I made

An animation will look like something like that (this one will make the object change color)
“current_object” is the model you apply the animation to.

{
	AnimationName = "Equip",
	Keys = {
		{
			["time"] = 0,
			["current_object.Left Arm"] = {
				["Color3"] = {
					["Value"] = {9, 3, 1},
				}
			}
		},
		
		{
			["time"] = 25,
			["current_object.Left Arm"] = {
				["Color3"] = {
					["Value"] = {1, 1, 1},
				}
			}
		},
		
		
		
		
		
	}
}

Ah, a properties animation. Ok.

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