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

# Authenticate API calls

> Learn how to create an application and access key in the Pelion Portal and include your Bearer token in every API request.

The Portal API authenticates requests using access keys passed as Bearer tokens in the HTTP `Authorization` header. Every API call you make must include a valid access key. The Portal rejects any request that does not. Before you can make API calls, create an application and then generate an access key within it.

## Step 1: Create an application

Applications group your access keys and let you organize credentials by integration or environment. You must create at least one application before you can create any access keys. You can have a maximum of **10 active applications** at any one time.

> [!NOTE]
>
> If you cannot see **Applications** in the Portal, your user account may not have the **View applications** permission. Ask your administrator to add it. See [Permissions required](https://help.pelion.com/api/access-keys.md#permissions-required).

**1. Go to the Applications page**

Navigate to **Applications** in the Portal.

**2. Select New**

Select the **New** button.

**3. Complete the form and create the application**

Fill in the required fields, then select **Create**.

Your application is created and appears in the Applications table.

> [!NOTE]
>
> API access keys and applications are bound to the user account that created them. If you delete a user, all applications and access keys they created will immediately stop working. Plan your integrations accordingly and avoid creating shared credentials under personal accounts.

## Step 2: Create an access key

Once you have an application, you can create access keys within it. You can have a maximum of **10 active access keys per application**.

**1. Go to the Applications page**

Navigate to **Applications** in the Portal.

**2. Select your application**

Select the application you want to add an access key to.

**3. Open the Access keys tab**

Select the **Access keys** tab.

**4. Select New**

Select the **New** button.

**5. Complete the form and create the key**

Fill in the required fields, choose the scopes you want to grant, then select **Create**.

Your access key is created and displayed on screen.

**6. Copy your access key securely**

Copy your access key and store it in a secure location, such as a secrets manager or password vault. Once you have saved it, select **I have copied my access key - Close**.

> [!WARNING]
>
> You can only view your access key at the moment it is created. The Portal does not display it again after you close the confirmation modal. Copy it to a secure location immediately. If you lose it, you will need to revoke the key and create a new one.

## Make an API call

Include your access key as a Bearer token in the `Authorization` header of every request. The example below shows how to structure a call using `curl`:

```bash theme={null}
curl -X GET "https://connectivity-eu-api.pelion.com/path/to/resource" \
  -H "Authorization: Bearer YOUR_ACCESS_KEY"
```

Replace `YOUR_ACCESS_KEY` with the access key you copied during creation. You can use the same pattern for any HTTP method (`GET`, `PUT`, `DELETE`, and so on). The `Authorization` header format remains the same.

## Access key scopes

Scopes define what an access key is permitted to do. When you create an access key, you select the scopes to grant it. Keep the following rules in mind:

* **Scopes mirror your user permissions.** You can only grant an access key permissions that your own user account already has. You cannot escalate privileges through an access key.
* **Scopes are set at creation and cannot be changed.** If you need a different set of scopes, revoke the existing key and create a new one.

> [!TIP]
>
> Apply the principle of least privilege when setting scopes. Grant each access key only the permissions it needs for its specific integration. This limits the impact if a key is compromised.


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