As a Roblox developer, it’s currently too hard to communicate with Roblox servers from an external server.
Exposing a HTTP endpoint, eg https://game.roblox.com/{GameID}/{Function}/{JobID}
would make this possible. The developer would have to first create an endpoint in studio by uploading an endpoint from the game explorer, similar to uploading a package. The player can then bind a function to run in that server whenever the endpoint is invoked. If the endpoint is invoked without a specific JobID then the endpoint package will run in every server
--TeleportPlayerToJob endpoint, allowing for easy cross-server match making managed by an external server
game:GetService("HttpService"):BindToEndpoint("TeleportPlayerToJob", function(Request)
if (game.JobId == Request.JobId) then return true end
local TeleportPlayer = game.Players:GetPlayerByUserId(Request.PlayerId)
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, Request.JobId, TeleportPlayer)
end)
Then fire a request from an external server
RequestData = {
Url: "https://game.roblox.com/185655149/TeleportPlayerToJob/719fb424-d60d-40a2",
Body: {
PlayerId: "1",
JobId: "e9feed6b-235e-4040"
},
Headers = {
["Authorization"] = "hmac sha256 digest of {url.body}"
}
}