# API lấy thông tin user

## Lấy thông tin user

<mark style="color:blue;">`GET`</mark> `https://oauth.casso.vn/v1/userInfo`

Lấy chi tiết thông tin của user về bank và business

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Access-Token |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "error": 0,
    "message": "success",
    "data": {
        "user": {
            "id": 1553,
            "email": "haonh@magik.vn"
        },
        "business": {
            "id": 1540,
            "name": "Hữu Hảo"
        },
        "bankAccs": [
            {
                "id": 69,
                "bank": {
                    "bin": 970416,
                    "codeName": "acb_digi"
                },
                "bankAccountName": null,
                "bankSubAccId": "17271687",
                "connectStatus": 1,
                "planStatus": 1
            },
            {
                "id": 63,
                "bank": {
                    "bin": 970454,
                    "codeName": "timoplus"
                },
                "bankAccountName": null,
                "bankSubAccId": "8007041023848",
                "connectStatus": 1,
                "planStatus": 0
            }
        ]
    }
}
```

{% endtab %}

{% tab title="401 Could not find a cake matching this query." %}

```
{
    "error": 401,
    "message": "Unauthorized Access",
    "data": null
}
```

{% endtab %}
{% endtabs %}

```
curl --location --request GET 'https://oauth.casso.vn/v1/userInfo \
--header 'Authorization: Access token'
```
