> For the complete documentation index, see [llms.txt](https://rand-chat.gitbook.io/rand_chat-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rand-chat.gitbook.io/rand_chat-docs/i-o/i-o-api/undefined.md).

# 회원 참여 채팅방 리스트 조회

회원이 참여하고 있는 채팅방 목록을 조회하는 API (정렬 포함)

<mark style="color:purple;">`GET`</mark>   `/chat/api/v1/room`

**Request Headers**

<table><thead><tr><th width="239">Name</th><th>Value</th></tr></thead><tbody><tr><td>Accept</td><td>application/json</td></tr><tr><td>Cookie</td><td>리프레시 토큰</td></tr><tr><td>Access</td><td>액세스 토큰</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": 200,
    "code": "SUCCESS REQUEST",
    "data": [
        {
            "chatRoomId": "11",        //채팅방 고유번호
            "opsProfileImg": null,    //상대방 프로필 이미지
            "opsNickName": null,      //상대방 닉네임
            "curMsg": null,           //최근메시지 한개        
            "curMsgCrDate": null,     //최근메시지 전송일
            "curChatType": null,      //최근메시지 타입(텍스트,사진등등)
            "unreadCount": 0,         //안읽은 메시지 개수
            "roomState": "ACTIVE",    // 채팅방 상태
            "abNormalFlag": true      //비정상 플래그 
        },
        {
            "chatRoomId": "10",
            "opsProfileImg": null,
            "opsNickName": null,
            "curMsg": null,
            "curMsgCrDate": null,
            "curChatType": null,
            "unreadCount": 0,
            "roomState": "ACTIVE",
            "abNormalFlag": true
        },
        {
            "chatRoomId": "12",
            "opsProfileImg": null,
            "opsNickName": "하하1",
            "curMsg": "프히ㅏ",
            "curMsgCrDate": "2024-12-28 11:59:29",
            "curChatType": "TEXT",
            "unreadCount": 1,
            "roomState": "ACTIVE",
            "abNormalFlag": false
        }
    ],
    "timestamp": "2024-12-28 14:23:01"
}
```

{% endtab %}

{% tab title="400" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status": 400,
    "message": "참여중인 채팅방이 없습니다.", 
    "code": "ERR-CHAT-API-01",
    "timestamp": "2024-11-16 02:00:18"
}
</code></pre>

{% endtab %}
{% endtabs %}

* ```
  최근메시지 타입 : TEXT, IMG, VIDEO ,LINK
  ```
* ```
  채팅방 상태 : ACTIVE(활성화), INACTIVE(상대방이 나감)
  ```
* ```
  비정상 플래그 : false : 이상없음 , true : 탈퇴한 회원관의 채팅임 
  ```
