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

# Authentication

> Authenticate to Vatis Streams API

The Vatis Streams API offers the following authentication schemas:

* **Client credentials**: Authenticate using the `Client Id` and `Client Secret` provided by Vatis Tech Platform
* **Authorization token**: Authenticate using an `access_token` obtained by exchanging the client credentials
* **API Key**: Authenticate using an `api key` provided by Vatis Tech Platform

> [tab] Client credentials
>
> **1. Get client credentials**
>
> Get the `Client Id` and `Client Secret` from your [API Dashboard](https://vatis.tech/app/playground/transcribe)
>
> **2. Set the client credentials**
>
> There are two ways to set the client credentials on each request:
>
> 1. Set the `X-Client-Id` and `X-Client-Secret` headers
>
> 2. Set the `client_id` and `client_secret` query parameters
>
> > [!WARNING]
> >
> > Send the credentials as query parameters with extra caution as they may get logged

> [tab] Authorization token
>
> **1. Get client credentials**
>
> Get the `Client Id` and `Client Secret` from your Vatis Tech Platform account
>
> **2. Exchange credentials for access token**
>
> Request the access token as illustrated below:
>
> ```bash theme={null}
>  curl --request POST \
>   --url https://auth.vatis.tech/realms/vatistech/protocol/openid-connect/token \
>   --header 'Content-Type: application/x-www-form-urlencoded' \
>   --data 'client_id=string' \
>   --data 'client_secret=string' \
>   --data grant_type=client_credentials
> ```
>
> > [!TIP]
> >
> > [Try it out](https://docs.vatis.tech/api-reference/commons/authenticate.md)
>
> **3. Extract the access token**
>
> In the response, you will get an `access_token` which you can use to authenticate your requests.
>
> ```json theme={null}
> {
>     "access_token": "eyJhb...",
>     "expires_in": 600,
>     "token_type": "Bearer",
>     ...
> }
> ```
>
> > [!WARNING]
> >
> > It's recommended to obtain a new access token before each workflow execution
>
> **4. Set the authorization token**
>
> There are two ways to set the authorization token on each subsequent request:
>
> 1. Set the `Authorization` header with the `Bearer [token]` value
>
> 2. Set the `access_token` as a query parameter having the token as the value
>
> > [!NOTE]
> >
> > It's recommended to set the token as a header

> [tab] API key
>
> **1. Get the API key**
>
> Get the `API key` from your [API Dashboard](https://vatis.tech/app/playground/transcribe)
>
> **2. Set the API key**
>
> There are two ways to set the API key on each subsequent request:
>
> 1. Set the `Authorization` header with the `Basic [api_key]` value
>
> 2. Set the `access_token` as a query parameter having the API key as the value
>
> > [!WARNING]
> >
> > Send the API key as query parameter with extra caution as it may get logged


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