WebSocket Connection

Arifa uses secure WebSocket (WSS) connections.

Connection Format

wss://notifications.arifa.dev/ws/connect?api_key=YOUR_API_KEY&recipient=UUID&client=web/mobile

Required Parameters:

ParameterDescription
api_keyYour Live or Test API Key
recipientThe user receiving notifications (UUID)
clientcan be web or mobile based on the apikey type

Example in JavaScript

const ws = new WebSocket(
  "wss://notifications.arifa.dev/ws/connect?api_key=TEST_123&recipient=2fdb5a8e-62fc-4af2-9c41-807c3e9a8b17&client=web/mobile"
);

ws.onmessage = (msg) => {
  console.log("Received:", msg.data);
};

When WebSocket Opens

The user is considered online, and notifications will be delivered instantly.