# Authentication

Abyssale uses **API Key Authentication**: Your API key is passed along with every API call, allowing Abyssale to identify your company account and access your data.

## How to get an API Key?

{% hint style="warning" %}
Access to the API key requires at least an **Admin** role.
{% endhint %}

1. Go to [app.abyssale.com](https://app.abyssale.com/) & log in
2. Click `Workspace settings` on the left menu
3. Click `API Key` on the left menu
4. Click the green `Create new API key` button.
5. Once done, your API key will be available *(with a small delay of 30seconds)* & you can copy it *(by clicking on the copy icon button on the right part)*.

<figure><img src="https://3568284716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHvY8mOYKzvcoxVpCu4FE%2Fuploads%2FjEqtixLYXY1vFnibej0j%2Fimage.png?alt=media&#x26;token=eb203589-5429-47fb-9d2e-31d14ef73983" alt=""><figcaption><p>Workspace settings</p></figcaption></figure>

<figure><img src="https://3568284716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHvY8mOYKzvcoxVpCu4FE%2Fuploads%2FpM48jZuAL9WNnGtvFdms%2Fimage.png?alt=media&#x26;token=5cc3f520-e4e6-41b0-9ec4-9417bc3cab82" alt=""><figcaption><p>Create new API key</p></figcaption></figure>

**All of your Abyssale requests must contain a `x-api-key` header with your API Key**

## How to test your authentication?

Just call the `GET /ready` route with the header mentioned below, as follows:

{% tabs %}
{% tab title="cURL" %}

```
curl -i -H "x-api-key: {YOUR-API-KEY}" https://api.abyssale.com/ready # HTTP/2 200
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const axios = require('axios');

axios.get("https://api.abyssale.com/ready", {headers: {"x-api-key": "{YOUR-API-KEY}"}}).then(response => {
    console.log(response.status) // 200
})
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

r = requests.get("https://api.abyssale.com/ready", headers={"x-api-key": "{YOUR-API-KEY}"}, timeout=30)
r.status_code # 200
```

{% endtab %}
{% endtabs %}

If the status code received is a **200**, everything is OK.
