Hello All,
Is there any way to access Roblox datastores externally, from other websites? Or is there ways to make requests from external sources to your Roblox game to request data?
Thanks in Advance!
Hello All,
Is there any way to access Roblox datastores externally, from other websites? Or is there ways to make requests from external sources to your Roblox game to request data?
Thanks in Advance!
Roblox servers can send requests but I don’t think the opposite (Roblox servers receiving the request). At this point you might as well save data using your own database and not Roblox’s data stores.
I don’t think so but I am not professional in roblox development yet so idk.
I agree, but there’s already so much data stored in them currently, so it’d be a pain to migrate everything.
Is that possible just asking. If yes any guide or tutorial?
Then have a period of about a month or so to redirect any new data to your custom database.
So something like
-- of course you would handle get request in pcall this is just an example
local data = data_store:GetAsync(player_key)
if data ~= nil then
HttpService:PostAsync(
database_url,
HttpService:JSONEncode({ player_key = player_key, data = data })
) -- and sending any headers
end
So there’s no current way to access roblox datastores?
Externally no. If you absolutely need to manage the data yourself then you should use your own database.
Unfortunately, no, you cannot access data store data externally at all as far as I’m aware.
If you have the ability to host an HTTP server of some kind though, you can certainly request data in game but if you have the ability to host an HTTP server you likely have the ability to host some sort of data storage too, and, this is FAR better for multiple reasons.
But, just because, the quickest way to communicate to a Roblox server via HTTP is to use a technique called HTTP polling. Effectively, you make a request to your server with no time out period, and, your server simply doesn’t respond with any data until data is ready to be sent. As soon as your server responds, Roblox receives the data, the request is completed, and you can then poll again. This basically creates an open HTTP connection, which, you can effectively get to be comparable in speed to a websocket. Aka, you can create real time data transfer this way.
In fact, a websocket basically looks the same, the difference is when data is received on a websocket the connection is not closed but when data is received via HTTP polling the connection is closed then immediately reopened, which is obviously a little slower, so, the best way to compensate is to collect multiple requests or multiple pieces of data and send them in one big chunk of data.
If you want to look like a nerd, you can just make raw requests to https://gamepersistence.roblox.com, but in theory it’s the same as using DataStoreService, if you know what you’re doing it can help a lot and it allows you to request stores without being on a game nor in studio, but they constantly change these endpoints