コンテンツへスキップ
Fumadocs

Subscribe to User Events

受信
/users/{userId}/events
サーバー

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.

認可

headerAuthorizationBearer <JWT>

JWT Bearer token authentication for WebSocket connections

アドレスパラメーター

userId*string

The 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);
});

メッセージ