Developer API: events stream
Your app's events as Server-Sent Events, the same events and the same bodies as its webhooks, in order, resumable for 30 days.
مثالوں میں اپنی ٹیسٹ کلائنٹ آئی ڈی دیکھنے کے لیے سائن اِن کریں۔
GET https://developers.aton-network.org/api/v1/events
When to use it
When you would rather hold a connection open than run a public address for webhooks: a worker, a desktop app's server, a test. The WebSocket form is wss://developers.aton-network.org/api/v1/events/ws.
Authentication
Authorization: Bearer <API key> with the events:read right.
Parameters
| Name | In | Type | Required | Limits | What it is |
|---|---|---|---|---|---|
Authorization | header | string | yes | An API key with events:read. | |
Last-Event-ID | header | string | no | The id of the last event you handled; the stream sends what you missed first. EventSource-style clients send it on their own. | |
after | query | string | no | The same as Last-Event-ID, for clients that cannot set headers. | |
types | query | string | no | user.signed_in, consent.revoked, membership.changed, ping, comma separated | Only these event types. |
Request
# Follow the events stream. -N keeps curl from buffering; pass the last id you handled to resume.
curl -N https://developers.aton-network.org/api/v1/events \
-H "Authorization: Bearer $ATHERON_API_KEY" \
-H "Accept: text/event-stream" \
-H "Last-Event-ID: $LAST_EVENT_ID"Response
http
HTTP 200
content-type: text/event-stream
retry: 3000
event: ready
data: {"types":null}
id: 5b1c2a8e-0000-4000-8000-000000000001
event: user.signed_in
data: {"id":"5b1c2a8e-0000-4000-8000-000000000001","type":"user.signed_in","created":"2026-10-15T17:02:11.000Z","client_id":"live-1a2b3c4d5e6f7a8b","data":{"sub":"9a6d4c1e-1f0b-4a51-8a8e-3b2f6c0d7e11","scopes":["openid","email"],"at":"2026-10-15T17:02:11.000Z"}}
: beatErrors
| HTTP | error | Cause | Fix |
|---|---|---|---|
| 401 | invalid_key | No API key was sent, or it is not one of ours, expired or revoked. | Send Authorization: Bearer with a key from the app's API keys page. |
| 403 | missing_right | The key does not carry the right this call needs. | Make a key with the right (app:read or usage:read). |
| 429 | rate_limited | Over your quota for this bucket, this minute or this day. | Wait the Retry-After seconds. Requests over the limit still count, so a retry loop keeps you over it. |
| 400 | invalid_request | A parameter is missing or malformed: no PKCE, PKCE with plain, a bad max_age, prompt=none combined with another prompt, or a token request that is not form encoded. | Send every required parameter once, PKCE with S256, and form-encode the token request. |
| 500 | server_error | Something went wrong at our end. | Try again in a moment. If it keeps happening, check the status page and tell us in the chat. |
Good to know
- Opening a stream counts as one call against the api quota; the events themselves do not.
- A comment line (: beat) comes every 15 seconds so proxies keep the connection open. An error after the stream started arrives as event: error, then the stream closes.
- The SDKs follow the stream for you, reconnecting and resuming from the last id: followEvents in @aton-network/sdk, follow_events in atheron for Python.
Security
- Never put an API key in a URL or in code that ships to a browser: open the stream from your server.
Atlas سے پوچھیں
AI اسسٹنٹAtheron کے ساتھ سائن ان، API یا پورٹل کے بارے میں کچھ بھی پوچھیں۔ جواب ہماری دستاویزات سے آتا ہے، استعمال شدہ صفحات کے لنک کے ساتھ۔