Subscribe to User Events
Receive
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.
header
AuthorizationBearer <JWT>JWT Bearer token authentication for WebSocket connections
userId*stringThe ID of the user
const socket = new WebSocket("wss://galaxy.scalar.com/users/{userId}/events?api_key=YOUR_API_KEY");
socket.addEventListener("message", (event) => {
console.log(event.data);
});