# Authentication

API requests are authenticated using a [token-based HTTP Authentication scheme](https://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication). The Deepomatic API uses API keys to authenticate requests. You need to provide the API key preceded by Token in the `Authorization` header of the request.&#x20;

In addition to the API key, the site-id of your visual application will need to be provided in the URL of the request:&#x20;

{% code overflow="wrap" %}

```bash
curl -H "Authorization: Token <your_api_key>" https://api.{site-id}.customers.deepomatic.com/v0.2/task-groups/
```

{% endcode %}

### Get your API key&#x20;

You can view and get your API keys directly in the [Deepomatic platform](https://studio.deepomatic.com/en-US/organizations), in the *My account* page.

<figure><img src="/files/cz9SPe17uUxfkpHU2gd2" alt=""><figcaption><p><em>My account page</em></p></figcaption></figure>

API keys are tied to the Deepomatic user account for which they were created. **An API key provides the same level of access & privileges that its associated Deepomatic user account would have.**

Since authentication parameters are transmitted through HTTP headers, and the transferred data may contain sensitive information, it is strongly recommended to use HTTPs with secure encryption.

{% hint style="warning" %}
Your API keys carry many privileges, so be sure to keep them secure! Do not share your API keys in emails, chat messages, client-side code or publicly accessible sites.
{% endhint %}

### Get your site-id&#x20;

In order to put the visual application into production and start extracting value from it, it first needs to be [deployed as a site](/platform-documentation/deepomatic-engage/deploying-visual-automation-apps.md). The site-id therefore corresponds to the identifier of the site on which you want to make API calls. &#x20;

{% hint style="warning" %}
For API requests to work, the site must be deployed. Make sure that the site is up and running with the Deepomatic team before making the first API calls.&#x20;
{% endhint %}

You can get the side-id corresponding to your visual application in the *Deployments* section in our platform. To retrieve the site-id, click on the options button for the corresponding site, and then on *Credentials*.&#x20;

The 20 first digits (highlighted in red below) represents the site-id, and will therefore need to be passed in the URL for each request. &#x20;

<figure><img src="/files/pQeSW7jH4r51XDqR5Dd7" alt=""><figcaption><p><em>Credentials</em> modal</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deepomatic.com/platform-documentation/deepomatic-engage/integrating-visual-automation-applications/api-integration/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
