[Yandex Cloud documentation](../../index.md) > [Yandex MetaData Hub](../index.md) > Apache Hive™ Metastore > API reference > API authentication

# Apache Hive™ Metastore API authentication

Before you can work with the API, you need to get an [IAM token](../../iam/concepts/authorization/iam-token.md):

* [Guide](../../iam/operations/iam-token/create.md) for a Yandex account.
* [Guide](../../iam/operations/iam-token/create-for-sa.md) for a service account.
* [Guide](../../iam/operations/iam-token/create-for-federation.md) for a federated account.

Specify the received IAM token when accessing Yandex Cloud resources via the API. Provide the IAM token in the `Authorization` header in the following format:

```yaml
Authorization: Bearer <IAM_token>
```

If you have saved your IAM token to a variable, use the latter:

```yaml
Authorization: Bearer ${IAM_TOKEN}
```

#### Useful links {#see-also}

[Accounts in Yandex Cloud](../../iam/concepts/users/accounts.md)

_Apache® and [Apache Hive™](https://hive.apache.org/) are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries._