> For the complete documentation index, see [llms.txt](https://developer.leaderos.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.leaderos.net/auth/sessions.md).

# Sessions

<mark style="color:blue;">`GET`</mark> `https://yourwebsite.com/api/auth/sessions/<token>`

{% tabs %}
{% tab title="200: OK Successful" %}

```json
{
    "status": true
}
```

{% endtab %}

{% tab title="404: Not Found Session not found" %}

```json
{
    "status": false,
    "error": "SESSION_NOT_FOUND",
    "message": "Session not found!"
}
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `https://yourwebsite.com/api/auth/sessions`

#### Request Body

| Name                                     | Type   | Description                    |
| ---------------------------------------- | ------ | ------------------------------ |
| userID<mark style="color:red;">\*</mark> | int    |                                |
| ip<mark style="color:red;">\*</mark>     | string |                                |
| expires                                  | string | Datetime (2025-01-20 15:30:20) |

{% tabs %}
{% tab title="201: Created Successful login" %}

```json
{
    "status": true,
    "token": "202cb962ac59075b964b07152d234b70"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "status": false,
    "error": "USER_NOT_FOUND",
    "message": "User not found!"
}
```

{% endtab %}
{% endtabs %}
