# Login

## Login <a href="#undefined" id="undefined"></a>

After initialization is complete, you can log in by entering your username, name, and profile image address (optional).

### Access <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 | Nickname            | X        |
| PROFILE\_URL  | string | Profile address URL | X        |
| LANGUAGE      | string | Language code       | X        |
| CUSTOM\_FIELD | string | User-defined field  | X        |
| TOKEN         | string | Token value         | X        |

> Note
>
> * Obtain a token through the API for log-in security.
> * [API DOCS TOKEN](https://api.ncloud-docs.com/docs/en/bizapp-token-issuance) lets you use a token issued through the API.
> * If you do not want to use the token method, set **disable** in **Dashboard > Security settings > Token authentication**.

### Terminate access <a href="#undefined" id="undefined"></a>

Use the code below to disconnect from the connected Game Chat server.

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

### User information <a href="#undefined" id="undefined"></a>

* Member Data Class

| ID      | Type   | Description   |
| ------- | ------ | ------------- |
| id      | string | User ID       |
| name    | string | Username      |
| profile | string | Image address |

#### **Import user information**

Gets information about a specific ID (only the nickname is sent for security reasons).

```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="116">ID</th><th width="95">Type</th><th width="445">Description</th><th>Required</th></tr></thead><tbody><tr><td>filter</td><td>object</td><td>Search is available for all fields of a query through filtering</td><td>O</td></tr><tr><td>sort</td><td>object</td><td>Define the filter for the fields you want to sort (ascending order "1", descending order "-1")</td><td>X</td></tr><tr><td>option</td><td>object</td><td>See the following when there are options</td><td>X</td></tr></tbody></table>

* Options

<table><thead><tr><th width="212">ID</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td>offset</td><td>number</td><td>Start offset</td></tr><tr><td>per_page</td><td>number</td><td>The number of returns (up to 100)</td></tr></tbody></table>
