# User Posts

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

## Returns posts posted by the user

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

Returns the first `x` count of posts you specify that the user has posted

#### 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 posts off                                           |
| max\_cursor                                     | String | The `max_cursor` returned from the request you made before to fetch the next page of posts |

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

```json
{
    "code": 200,
    "posts": [Object, Object, Object, Object],
    "min_cursor": 1632205340000,
    "max_cursor": 1632205340000,
    "has_more": 1
}
```

{% 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/posts?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/posts?api_key={API_KEY}&sec_user_id={sec_user_id}&count={count}")
response = request.json()
print(response)
```

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