Authentication


User Login

POST /auth/login

μ‚¬μš©μžλ₯Ό μΈμ¦ν•˜κ³  κ³ μœ ν•œ μ‚¬μš©μž ID와 μ•‘μ„ΈμŠ€ 토큰을 λ°˜ν™˜ν•©λ‹ˆλ‹€.

Headers

Name
Value

Content-Type

application/json

Authorization

{ access token }

App-Id

{ app id }

Body

Name
Type
Description

userId

string

nickname

string

profileImageUrl

string

AWS S3 URL

friends

Array<string>

uuid array

Response

{
  "status": "success",
  "userId": "string",
  "expiresAt": "timestamp"
}

Connect the Chat

WebSocket ν•Έλ“œμ…°μ΄ν¬ 쀑에 토큰과 userIdκ°€ κ²€μ¦λ©λ‹ˆλ‹€

Event

Event Name: connect

Header

Name
Type
Descriptoin

App-Id

{ app id }

Authorization

{ access token }

Payload

Name
Type
Description

userId

string

Response

{
  "event": "connected",
  "data": {
    "status": "success",
    "userId": "user-12345",
    "timestamp": "2025-01-18T12:00:00Z"
  }
}

Disconnect From Chat

μ—°κ²° μ’…λ£Œ μ‹œ λͺ¨λ“  μΊμ‹œ 데이터가 ν΄λ¦¬μ–΄λ©λ‹ˆλ‹€. 이 APIλŠ” μ‚¬μš©μžκ°€ 더 이상 μ±„νŒ… 연결이 ν•„μš”ν•˜μ§€ μ•Šμ„ λ•Œ ν˜ΈμΆœλ©λ‹ˆλ‹€.

Event

Event Name: disconnect

Headers

Name
Value

Authorization

{ access Token }

App-Id

{ app id }

Payload

Name
Type
Description

userId

string

Response

{
  "event": "disconnected",
  "data": {
    "status": "disconnected",
    "userId": "user-12345",
    "timestamp": "2025-01-18T12:10:00Z"
  }
}

Last updated