# ログイン

## ログイン <a href="#undefined" id="undefined"></a>

初期化の完了後にユーザー名、名前、プロファイル画像アドレス(オプション)を入力してアクセスできます。

### アクセス

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

| ID            | Type   | Description    | Required |
| ------------- | ------ | -------------- | -------- |
| USERNAME      | string | ID             | O        |
| NAME          | string | ハンドルネーム        | X        |
| PROFILE\_URL  | string | プロファイルアドレス URL | X        |
| LANGUAGE      | string | 言語コード          | X        |
| CUSTOM\_FIELD | string | ユーザー定義フィールド    | X        |
| TOKEN         | string | トークン値          | X        |

> 参考
>
> * ログイン時に、セキュリティのために APIからトークンを発行することをお勧めします。
> * [API DOCS TOKEN](https://api.ncloud-docs.com/docs/ja/bizapp-token-issuance) APIから発行したトークンを使用できます。
> * トークン方式を使用しない場合、 **ダッシュボード > セキュリティ設定 > Token認証** を **使用しない** に設定します。

### アクセス終了 <a href="#undefined" id="undefined"></a>

接続された Game Chatサーバとの接続を解除するには、以下のコードを使用します。

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

### ユーザー情報 <a href="#undefined" id="undefined"></a>

* Member Data Class

<table><thead><tr><th width="188">ID</th><th width="187">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>

#### **ユーザー情報を取得する**

特定の IDに関する情報を取得します(セキュリティ上、ハンドルネームのみ転送します)。

```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="117">ID</th><th width="91">Type</th><th width="434">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="241">ID</th><th width="209">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-ri-ben-yu/v3nowo/roguin.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.
