# Auth

## Login and get Session Token

<mark style="color:green;">`POST`</mark> `https://portal.iphub.com.au/api/v1/auth/login`

This endpoint will return a session token. This must be used with our other APIs in the Authorization header

#### Query Parameters

| Name     | Type   | Description   |
| -------- | ------ | ------------- |
| username | string | Your email    |
| password | string | Your password |

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

```javascript
{
    "expiredAt": "2018-10-11T18:34:17+11:00",
    "token": "XXXXXXXXX-YOUR_SESSION_TOKEN_HERE_XXXXXXXXXXXX",
    "ttl": 3600,
    "user": {// user account}
}
```

{% endtab %}
{% endtabs %}
