HTTP Streaming Now Supports Server-Sent Events in Studio

[Update] October 23, 2025


Hello Creators,

We’re excited to announce that Server-Sent Events (SSE) are now supported in HTTPService within Studio! With SSE support, you can now maintain a live connection and receive streamed data from external tools and services to improve your development workflow and increase productivity.

For example, you can build a Studio plugin that no longer requires long-polling. Instead, you can now receive real-time events from an external server such as Blender, or integrate with your favorite LLM.

How to get started

  1. Set up HttpService as usual.
  2. Use the new CreateWebStreamClient() function to create an SSE client.
  3. Define your logic for handling streamed events (e.g., onMessage, onError).
  4. Connect to any endpoint that supports event streams and start processing streamed responses in real-time.

Sample Code

local HttpService = game:GetService("HttpService")
-- Be careful not to share this code with secrets inlined

local url_with_secret = ‘defineURLwithSecretHere’ 
-- This example calls the Google Gemini API

local function handleMessage(message)
	print("Stream message received:", message)
end

local sse_client = HttpService:CreateWebStreamClient(Enum.WebStreamClientType.SSE, {
	Url = url_with_secret,
	Method = "POST",
	Headers = {
		["Content-Type"] = "application/json",		},
	Body = HttpService:JSONEncode({ contents = { parts = { text ="How does the SSE protocol work?" }}}),
})
local messageConnection = sse_client.MessageReceived:Connect(handleMessage)
sse_client.Closed:Wait()
messageConnection:Disconnect() 

We’re excited to see how this feature helps you build more immersive games! As always, we welcome your feedback and questions. Let us know in the comments how you plan to use this in your workflows.

Roblox Creator Services Team


FAQs

Can I use this to connect to a third-party service for in-experience?

  • This feature is restricted to Studio only. Any CreateWebStreamClient() requests made in a live experience will be blocked. While you can use SSE within Studio, make sure to remove any CreateWebStreamClient() calls in your code before publishing. We encourage you to create plugins with this feature for reusability and ease of use.

Can I use Secrets Stores with plugins?

  • Unfortunately not at present. We are looking into how we can support the storage of secrets for plugins. We would love to hear any ideas or feedback on how you would like this to behave!

How long can streaming connections last?

  • Currently, streaming connections will timeout after 30 minutes. We plan to add support for indefinite connections soon- we encourage you to add a periodic heartbeat every 20 seconds from the server.

How many streaming connections can I have active at once?

  • Currently, you can have up to 4 WebStreamClients at once.
149 Likes

This topic was automatically opened after 11 minutes.

Rojo team here to celebrate the size of this W. I can’t promise any time tables because I haven’t looked into how difficult it will be to get Rojo using SSE yet, but this is obviously preferable to long-polling with HTTP requests and I want us to use it ASAP.

The days of fighting the Discord presence plugin over HTTP requests is over. Now begins the war over the 4 WebStreamClients.

Why does this limit exist? I can guess that it might be to limit resource consumption but… Why? Is it anticipated that people will bog down their computers with too many web streams?

This has been a blocker for Rojo supporting a secure server, because there’s no way to responsibly store secrets for the plugin: if someone inputted them into the plugin via a GUI, a malicious plugin could hijack it, but there’s otherwise not really a way to input secrets.

A potential blocker is that a large portion of of Rojo users use it in unpublished places, which means that Secrets don’t work either way.

Blink once if a PM forced you to say this.

64 Likes

Huge W. Thanks Roblox!

Is this per Plugin or global?

2 Likes

Are we ever gonna get something like this for live experience servers? This is already achieveable with an HttpService timeout loop but it would be much better to allow for a direct unfiltered communication!

19 Likes

I just wish it was available in live servers so that we could allocate more processes off the platform, would definitely help with large games with the money to get powerful resources on their own custom servers, but limited by Roblox not allowing this.

2 Likes

Do you need to solely send messages to servers without a response back? If so, MessagingService should be able to fill that gap for you.

1 Like

How is anyone supposed to do that if it’s a Studio only ?

6 Likes

It’s meant to help developers create plugins to speed up and make development easier

1 Like

I’m gonna take a wild guess and say that the studio-only restriction and maximum of 4 streams is (at least partly) to prevent Roblox servers from being used as a free way to DDoS stuff?

Well that, and some bad actor would 100% stream NSFW content into an EditableImage via a stream if this was available in-experience.

Yeah, just keep it locked to studio only LMAO.

1 Like

Sure, but “immersive” isn’t the correct term for this use-case. This is also why I said what I said.

4 Likes

This is great, but will we ever get WebSockets? For uploading constant streams of data, there’s currently no efficient way to do this. And long polling isn’t exactly the best.

3 Likes

Hi Meaxis,

This is a direction we would like to explore. Can you share more on what use cases or scenarios you would like enabled if this was available for in-experience?

Thank you

3 Likes

Hi NotBlackrus,

Can you share more on what workloads would you prefer to run off platform (as opposed to which Roblox services are not meeting your needs today)?

Thank you

1 Like

dude people can already do this with long polling (albeit reduced performance), are you seriously trying to justify restricting a great feature for everyone because of a small handful of people? with this logic, we should remove HttpService because people can render NSFW images!!! yes!!! this logic is definitely 100% perfect and unflawed

10 Likes

Hi Octav,

Thank you for the feedback - you make a good point, perhaps the wording could have been better chosen. My original intent was that with this capability, Creators may interface with third-party services that may improve development productivity (as CDFII mentioned) or for content generation that would lead to larger, more fleshed out, and immersive experiences.

Thank you again

2 Likes

Hi Dekkonot,

Thank you for your feedback - it is very insightful.

Regarding the limits, can you elaborate on what use case you are thinking of that would require more and how much more? Limits is something we are continuing to explore.

:Blink:

Thank you,

22 Likes

Hi Dekkonot,

Really appreciate the Rojo’s team feedback for this feature. Can’t wait to see what Rojo and other plugins can do with SSE!

For the current limit of 4 WebStreamClients- currently there is a limit of 5 concurrent HTTP requests for plugins, we wanted to ensure that not all of them are blocked by long running streaming requests. Now that HTTP/2 is supported in HttpService, we are actively looking at how we can raise both plugin request limits and WebStreamClient limits. Stay tuned!

7 Likes

Hi TenebrisNoctua,

Thanks for the feedback! The limit of 4 WebStreamClients is global.
We understand how this can be constraining and are working on raising this- see the above post for more info.

Thanks again!

3 Likes

It’s not that I can imagine using more than 4 for one project, it’s that I can imagine a world where someone has more than 4 plugins that do this installed and running. I can think of 3 right now that could be using it (Rojo’s plugin, the Luau LSP companion plugin to get DataModel info, and a Discord presence plugin that people like to use), and I know that the devtools for React-lua that are being developed might use it. That would be a problem!

#FreeLeafGreen888

23 Likes