> For the complete documentation index, see [llms.txt](https://masters-india-1.gitbook.io/ksa-e-invoicing-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://masters-india-1.gitbook.io/ksa-e-invoicing-api/authentication.md).

# Authentication

This section showcases how the 2 types of Authentication mechanisms we support

{% content-ref url="/pages/BemyBveg1GSQ9wHpAyHj" %}
[Access Tokens](/ksa-e-invoicing-api/authentication/access-tokens.md)
{% endcontent-ref %}

{% content-ref url="/pages/H6FxPw3pWpuPz6Z1Ohjo" %}
[API KEY](/ksa-e-invoicing-api/authentication/api-key.md)
{% endcontent-ref %}

## Authentication Header

### Access Token&#x20;

If you have chosen the access token approach then for authentication to work you will need to pass the token in request **headers** in the following manner

| Paramater     | Value                    | Description                                                                                              |
| ------------- | ------------------------ | -------------------------------------------------------------------------------------------------------- |
| Authorization | JWT **\<access\_token>** | **JWT** remains constant following by a space and then the access token received from the associated API |

### API Key

If you have chosen the API key approach then for authentication to work you will need to pass the token in request **headers** in the following manner

| Paramater | Value       | Description                                                |
| --------- | ----------- | ---------------------------------------------------------- |
| x-api-key | \<api\_key> | Pass the API key generated from the UI as is in the header |
