# Lấy thông tin nhiều tài khoản

## &#x20;Lấy thông tin nhiều tài khoản &#x20;

<mark style="color:blue;">`GET`</mark> `https://abc.hoola.vn/manage/api/users/get-multi-user`

&#x20;Một lần truy vấn lấy được tối đa thông tin 100 tài khoản&#x20;

#### Query Parameters

| Name  | Type    | Description                                                                 |
| ----- | ------- | --------------------------------------------------------------------------- |
| token | string  | Token xác thực tài khoản của bạn                                            |
| start | integer | Bỏ qua số lượng tài khoản trong kết quả truy vấn (tối thiểu là 0)           |
| limit | integer | Giới hạn số lượng tài khoản lấy thông tin (tối thiểu là 1 và tối đa là 100) |

{% tabs %}
{% tab title="200 Lấy thông tin nhiều tài khoản thành công " %}

```javascript
Mã phản hồi respCode "00". Truy vấn thành công. Dữ liệu trả về
{
    "respCode": "00",
    "users": [
        {
            "_id": "73chhLtPnxpPoekrx",
            "createdAt": "2021-05-27T08:38:15.067Z",
            "username": "vuvanhoang",
            "emails": [
                {
                    "address": "hoangvuvan@abc.com",
                    "verified": false
                }
            ],
            "profile": {
                "name": "Vu Van Hoang"
            },
            "myCourses": [
                {
                    "courseId": "wSZpqbtWowmpLC68L",
                    "activatedDate": "2021-05-29T06:19:24.107Z",
                    "expiredAt": "2121-05-05T06:19:24.107Z"
                }
            ],
            "myCart": [
                {
                    "courseId": "vivPteJNNC2P94Es8",
                    "status": "DELETED"
                }
            ],
            "myTransactions": [
                "nTv5XgDMNcMLBuRM5"
            ]
        },
        {
            "_id": "sWMDTaKwgdAqnLtYd",
            "createdAt": "2021-05-27T08:35:38.162Z",
            "username": "userAPI48",
            "emails": [
                {
                    "address": "userapi48@api.com",
                    "verified": true
                }
            ],
            "profile": {
                "name": "Tai khoan API 48",
                "affUserType": "L1",
                "tUid": ""
            },
            "myCourses": [],
            "myCart": [
                {
                    "courseId": "vivPteJNNC2P94Es8",
                    "status": "DELETED"
                }
            ]
        },
        {
            "_id": "jSYigdZhMMLY9yava",
            "createdAt": "2021-05-27T07:15:01.150Z",
            "username": "userAPI44",
            "emails": [
                {
                    "address": "userapi44@api.com",
                    "verified": false
                }
            ],
            "profile": {
                "name": "Tai khoan API 44"
            },
            "myCart": [
                {
                    "courseId": "wSZpqbtWowmpLC68L",
                    "status": "DELETED"
                }
            ]
        }
    ],
    "msg": "Success"
}
```

{% endtab %}

{% tab title="400 Truy vấn thiếu tham số yêu cầu hoặc tham số không đúng định dạng  " %}

```javascript
Mã phản hồi respCode "02". Thiếu tham số token tài khoản của bạn. Data trả về
{
    "respCode": "02",
    "users": null,
    "msg": "No token"
}


Mã phản hồi respCode "03". Thiếu tham số start. Data trả về
{
    "respCode": "03",
    "users": null,
    "msg": "No start parameter"
}


Mã phản hồi respCode "04". Tham số start không đúng định dạng. Data trả về
{
    "respCode": "04",
    "users": null,
    "msg": "Invalid start parameter, start should be greater than or equal 0"
}


Mã phản hồi respCode "05". Thiếu tham số limit. Data trả về
{
    "respCode": "05",
    "users": null,
    "msg": "No limit parameter"
}


Mã phản hồi respCode "06". Tham số limit không đúng định dạng . Data trả về
{
    "respCode": "06",
    "users": null,
    "msg": "Invalid limit parameter, limit should be greater than 0 and less than 100"
}
```

{% endtab %}

{% tab title="401 Xác thực tài khoản của bạn không thành công  " %}

```javascript
Mã phản hồi respCode "08". Token xác thực tài khoản của bạn không có hiệu lực hoặc đã hết hạn . Data trả về
{
    "respCode": "08",
    "users": null,
    "msg": "Invalid token || Token has expired"
}
```

{% endtab %}

{% tab title="403  Tài khoản của bạn không được phân quyền để thực hiện truy vấn  " %}

```javascript
Mã phản hồi respCode "09". Tài khoản của bạn không được phân quyền thực hiện truy vấn này. Data trả về 
{
    "respCode": "09",
    "users": null,
    "msg": "Your account does not have permission"
}
```

{% endtab %}

{% tab title="405 Phương thức truy vấn không hợp lệ " %}

```javascript
Mã phản hồi respCode "01". Phương thức không hợp lệ . Data trả về 
{
    "respCode": "01",
    "users": null,
    "msg": "Request method should be GET"
}
```

{% endtab %}

{% tab title="500  Lỗi " %}

```javascript
Mã phản hồi respCode "07". Server không xác thực được tài khoản của bạn. Data trả về 
{
    "respCode": "07",
    "users": null,
    "msg": "Server not able to authenticate your account"
}
```

{% endtab %}
{% endtabs %}

Ví dụ về lấy thông tin nhiều tài khoản:&#x20;

```javascript
GET: 
https://abc.hoola.vn/manage/api/users/get-multi-user?token=kshfk295xkjvbk0929375knxcbvk9895792&start=0&limit=50
```


---

# 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.hoola.vn/v5.0.0/ket-noi-api/get-multi-user.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.
