# API Tokens

API Tokens are strings that allow to authenticate API calls.

### Format

They are issued and used in the form of UUID represented in [canonical format](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format), for example `123e4567-e89b-12d3-a456-426614174000`.

### Usage

API Tokens should be used with bearer authentication. They need to be passed with the request as `authorization` Header with type `Bearer`.

For example:

```bash
curl --request GET \
  --url 'https://testapi.aviowiki.com/airports/search?query=London' \
  --header 'Authorization: Bearer 123e4567-e89b-12d3-a456-426614174000'
```

### API Token types

There are two types of API Tokens, `API` or `API_FREE`.

`API_FREE` tokens allow access only to [Free Endpoints](https://docs.aviowiki.com/free-endpoints/limitations), without rate limitations. \
Such Tokens can be issued autonomously by every user as they do not require any contractual agreement in place, other than accepting the regular [Terms and Conditions](https://www.aviowiki.com/terms/).

`API` tokens allow access to all endpoints.\
At the moment, these Tokens can only be issued by an aviowiki administrator, and an agreement need to be signed between the User and aviowiki. Please [get in touch](mailto:hello@aviowiki.com) if you require an `API` token.
