Skip to content

Legacy UDP

UDP remains supported for existing integrations. Prefer WebSocket for new integrations.

Send one UTF-8 JSON object per datagram to 127.0.0.1:42069. Do not wrap it in a WebSocket envelope.

import json
import socket
message = {
"messageType": 1,
"title": "Hello from UDP",
"content": "An existing integration can still send notifications.",
"sourceApp": "YourApp",
"timeout": 5.0,
}
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as connection:
connection.sendto(
json.dumps(message).encode("utf-8"),
("127.0.0.1", 42069),
)

UDP sends do not acknowledge that AstralOverlay received or displayed the notification. If nothing appears, check the Notification API setting and whether another application owns the port.

See the shared payload reference.