# User Following

> <mark style="color:purple;">GENERAL ENDPOINT</mark>

## Returns a users following

<mark style="color:blue;">`GET`</mark> `https://kitkot.xyz/api/get_user/following`

Returns a list of users that the user you provide by `sec_user_id` is following

#### Query Parameters

| Name                                            | Type   | Description                                                                                                    |
| ----------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| api\_key<mark style="color:red;">\*</mark>      | String | The `api_key` you got when purchasing our service                                                              |
| sec\_user\_id<mark style="color:red;">\*</mark> | String | The `sec_user_id` of the user to fetch information about                                                       |
| count                                           | String | The amount of following to fetch per page                                                                      |
| page\_token                                     | String | The `page_token` you got in response from the previous request, which will give you the next page of following |

{% tabs %}
{% tab title="200: OK USER\_FOLLOWING\_FOUND" %}
{% code overflow="wrap" lineNumbers="true" %}

```json
{
    following_list: [Object, Object, Object, Object],
    total_following: 1444,
    has_more: 1,
    me_user_id: "",
    page_token: "",
    offset: 0
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request BAD\_REQUEST" %}
{% code lineNumbers="true" %}

```json
{
  "code": 400,
  "msg": "invalid parameters"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="NodeJS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
const fetch = require('node-fetch');

const BASEURL = "https://kitkot.xyz/api";
const API_KEY = "my-api-key";
const sec_user_id = "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM";
const count = "6";

const request = await fetch(`${BASEURL}/get_user/following?api_key=${API_KEY}&sec_user_id=${sec_user_id}&count=${count}`);
const response = await request.json();
console.log(response);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" lineNumbers="true" %}

```python
import requests

BASEURL = "https://kitkot.xyz/api"
API_KEY = "my-api-key"
sec_user_id = "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM"
count = "6"

request = requests.get(f"{BASEURL}/get_user/following?api_key={API_KEY}&sec_user_id={sec_user_id}&count={count}")
response = request.json()
print(response)
```

{% endcode %}
{% endtab %}
{% endtabs %}
