Projekty
APIChat

WebSocket konwersacji

Przekazuje żądanie upgrade do Durable Object CHAT_DO (userId i conversationId jako parametry). Po sukcesie 101 Switching Protocols z ramkami JSON.

GET
/api/chat/{id}/ws

Przekazuje żądanie upgrade do Durable Object CHAT_DO (userId i conversationId jako parametry). Po sukcesie 101 Switching Protocols z ramkami JSON.

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Better Auth session cookie (on HTTPS: __Secure-better-auth.session_token), forwarded to the login server's /api/auth/get-session

Path Parameters

id*string

Response Body

Przejście na protokół WebSocket (ramki JSON: message, messages_read).

Example Request
curl -X GET 'https://example.com/api/chat/string/ws'
Example Response
Empty