Fumadocs

Subscribe to User Events

Receive
/users/{userId}/events
Server

Subscribe to events for a specific user (requires authentication)

User-related events including authentication, profile changes, and activity tracking.

Security Note: These events contain sensitive user information and require proper authentication.

Authorization

headerAuthorizationBearer <JWT>

JWT Bearer token authentication for WebSocket connections

Address Parameters

userId*string

The ID of the user

Code Sample
const socket = new WebSocket("wss://galaxy.scalar.com/users/{userId}/events?api_key=YOUR_API_KEY");

socket.addEventListener("message", (event) => {
  console.log(event.data);
});

Messages