> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiyoti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Log in, send the AccessKey header, and refresh credentials.

## Log in

We recommend creating a dedicated Aiyoti user for each integration, with only the account access and permissions it needs. Use that user's credentials instead of a person's everyday login so the integration's access can be managed independently.

Call Log in (`POST /Users/Login`) with your email and password. The response includes `access` and `refresh` credentials plus user and account information.

Keep credentials in secure server-side storage and out of public code and logs.

## Authenticate asset requests

Send the `access` token returned by Login in the `AccessKey` request header:

```http theme={null}
AccessKey: YOUR_ACCESS_TOKEN
```

Both `access` and `refresh` tokens are accepted in this header. Use `access` for asset requests and reserve `refresh` for credential renewal.

## Refresh credentials

Call Refresh credentials (`POST /Users/RefreshTokens`) with the `refresh` token returned by Login:

```json theme={null}
{
  "RefreshKey": "YOUR_REFRESH_TOKEN"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.