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

# Authentication

> Authenticate every Developer API request with your API key and secret.

Every request sends your API key and secret as headers:

```http theme={null}
GET /devapi/me HTTP/1.1
Host: server.gallabox.com
apiKey: <your API key>
apiSecret: <your API secret>
```

## Create an API key

Go to **Settings** → **Developer** → **API Keys** in Gallabox and click **Add new**. Gallabox shows the secret only once, so store it safely. See [API Keys](https://docs.gallabox.com/settings/api-keys.md) for the full steps.

Each key belongs to one account. In URLs that contain `{accountId}`, use the account the key belongs to.

## Check that your key works

Call `GET /devapi/me`. It returns the user who owns the key and their account, including your account ID.

```bash theme={null}
curl https://server.gallabox.com/devapi/me \
  -H "apiKey: <your API key>" \
  -H "apiSecret: <your API secret>"
```

A missing or wrong key returns `401`:

```json theme={null}
{
  "status": "Unauthorized",
  "message": "Unauthorized"
}
```

## What a key is allowed to do

* **Permission scope.** When you create a key, you choose **All**, **Read only** or **Restricted**. A request the key isn't allowed to make returns `403`. Each endpoint's `403` response names the permission it needs.
* **Plan.** Some endpoints need a feature of your Gallabox plan. Without it, they also return `403`.
* **The key's creator.** A key works with the access of the user who created it. If that user is removed from the account, the key stops working.

> [!WARNING]
>
> Keep the secret on your server. Don't put it in a website, a mobile app or anything else your customers can see.


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