# 로그인

## 로그인

초기화 완료 후 사용자명, 이름, 프로필 이미지 주소(옵션)를 입력하여 접속 할 수 있습니다.

### 접속

```csharp
await nc.Connect(
    id: [USERNAME],
    name: [NAME],
    profile: [PROFILE_URL],
    customField: [CUSTOM_FIELD],
    token: [TOKEN]
);
```

<table><thead><tr><th width="233">ID</th><th width="126">Type</th><th width="249">Description</th><th>Required</th></tr></thead><tbody><tr><td>USERNAME</td><td>string</td><td>아이디</td><td>O</td></tr><tr><td>NAME</td><td>string</td><td>닉네임</td><td>X</td></tr><tr><td>PROFILE_URL</td><td>string</td><td>프로필 주소 URL</td><td>X</td></tr><tr><td>LANGUAGE</td><td>string</td><td>언어코드</td><td>X</td></tr><tr><td>CUSTOM_FIELD</td><td>string</td><td>사용자 정의 필드</td><td>X</td></tr><tr><td>TOKEN</td><td>string</td><td>토큰 값</td><td>X</td></tr></tbody></table>

> 참고
>
> * 로그인 시 보안을 위해 API로 토큰을 발급받는 것을 권장합니다.
> * [API DOCS TOKEN](https://api.ncloud-docs.com/docs/bizapp-token-issuance) API를 통해 발급된 토큰을 사용할 수 있습니다.
> * 토큰 방식을 사용하지 않으실 경우 **대시보드 > 보안설정 > Token 인증**을 **사용 안함**으로 설정해 주십시오.

### 접속 종료

연결된 Game Chat 서버와의 연결을 해제하려면 아래 코드를 사용해 주십시오.

```csharp
await nc.Disconnect();
```

### 사용자 정보 <a href="#undefined" id="undefined"></a>

* Member Data Class

<table><thead><tr><th width="181">ID</th><th width="216">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>사용자 ID</td></tr><tr><td>name</td><td>string</td><td>사용자 이름</td></tr><tr><td>profile</td><td>string</td><td>이미지 주소</td></tr></tbody></table>

#### **사용자 정보 가져오기**

특정 아이디에 대한 정보를 가져옵니다(보안상 닉네임만 전달됩니다).

```csharp
Hashtable filter = new Hashtable
{
    { "id", [USER_ID] }
};
Hashtable sort = new Hashtable
{
    { "created_at", -1 }
};
Hashtable option = new Hashtable
{
    { "offset", 0 },
    { "per_page", 10 }
};
var users = await nc.getUsers(filter, sort, option);
```

* Parameters

<table><thead><tr><th width="111">ID</th><th width="93">Type</th><th width="440">Description</th><th>Required</th></tr></thead><tbody><tr><td>filter</td><td>object</td><td>쿼리를 필터 모든 필드에 대해서 검색 가능</td><td>O</td></tr><tr><td>sort</td><td>object</td><td>소트 하고자 하는 필드의 필터 정의 (오름차순 "1", 내림차순 "-1")</td><td>X</td></tr><tr><td>option</td><td>object</td><td>옵션이 존재할 경우 아래 참고</td><td>X</td></tr></tbody></table>

* Options

<table><thead><tr><th width="207">ID</th><th width="208">Type</th><th>Description</th></tr></thead><tbody><tr><td>offset</td><td>number</td><td>시작 offset</td></tr><tr><td>per_page</td><td>number</td><td>리턴하는 개수(최대 100개)</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gamechat.me/basics/game-chat-v3/game-chat/v3/undefined-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
