---
title: Authentication
slug: docs/RXTZ-authentication
createdAt: 2022-03-07T04:37:36.000Z
---



## Authenticate

Before making any requests to protected resources, you must authenticate using an email address and password to obtain an access token. Credentials to access API resources differ from user credentials for portal access. Excessive failed attempts will result in throttling. 

:::BlockQuote
**POST https\://acme.jomablue.com/import/api/v1/auth/login**
:::



### Properties

| **Property** | **More**                                                                |
| ------------ | ----------------------------------------------------------------------- |
| email        | Required. The email address of the account with access to API resources |
| password     | Required. The associated password.                                      |



### Example Request

:::CodeblockTabs
Example request body

```json
{
  "email": "myuser@jomablue.com",
  "password": "myverylongpassword"
}
```
:::



### Example Response

:::CodeblockTabs
Example Response body

```json
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...."
}
```
:::




## Token Validity 

Token validity is customisable for high risk applications, but has a default-soft long-lived setting of 1440 minutes. At which point API requests  will return 401 Unauthorized. 

The tokens expiry timestamp is encoded within the token if maintaining validity periods within your application is desired. We highly recommend having an authentication workflow to request a new token if your current token becomes invalid - and not simply rely on a manually obtained token and its lifetime. Jomablue reserves the right to revoke your token between feature releases if required - the authentication endpoints will be immediately available so  that you can obtain a new token.&#x20;



## Rate Limits

The authentication endpoint has a soft default rate limit of 6 per minute.

