Do you support SSE?

We do support SSE. This can be a useful way to get a realtime stream of events from Ably in circumstances where using a full Ably Realtime client library, or even an MQTT library, is impractical.

 

It is subscribe-only: you can not interact with the channel, including to publish, enter presence, query the presence set, attach and detach from channels (without closing and re-opening the stream), or anything else.

 

Check out our full documentation for further information.

 

Example call:

 

curl "https://rest.ably.io/event-stream?key=&channel=example&v=1.1"

 

FAQ

 

How do I authenticate using SSE?

 

To authorize using SSE, you'll need one of the following:

 

Basic Authentication: a querystring parameter of key or an Authorization: Basic <base64-encoded key> header; 

Token Authentication: a querystring parameter of accessToken containing an access token or an Authorization: Bearer <base64-encoded token> header.

 

 

What if I disconnect?

 

If you are disconnected, you can supply the id of the last event you received as the lastEvent querystring parameter of a new connection, to resume from that point.