# Get User Info

## Get userId by username

<mark class="gb-c-blue">`GET`</mark> `http://h1.eko12.local`/bot/v1/users?username=:username

Returns the uid of username in parameter

#### Headers

| Name          | Type            | Description                               |
| ------------- | --------------- | ----------------------------------------- |
| Authorization | Bearer \&lt;token> | Access Token (needs to have "bot" scope). |

#### Path Parameters

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| username | string | username    |

**200 Returns the User info.**

```
{
    "users": [
        {
            "_id": "id",
            "username": "username",
            "email": "email",
            "firstname": "firstname",
            "lastname": "lastname",
            "position": "",
            "deleted": false
        }
    ]
}
```

## Get User Info

<mark class="gb-c-blue">`GET`</mark> `http://h1.eko12.local/bot/v2/groups/:gid/users/:uid/info`

Returns the User info, if both the user and the bot are in the specific group.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| gid  | string | Group ID    |
| uid  | string | User ID     |

#### Headers

| Name           | Type   | Description                        |
| -------------- | ------ | ---------------------------------- |
| Authentication | string | Token (needs to have "bot" scope). |

**200 Returns the User info.**

```
{
    "_id": "5d563332aa9799106b5ffgh3",
    "firstname": "John",
    "lastname": "Doe",
    "avatar": "https://sample-url.com/john.jpg",
    "network_admin": true
}
```
