---
title: Authentication in API v2
description: "This chapter describes how to authenticate with the Lucidum API v2. The steps are: - Generate a token. - For LDG endpoints, see the section [Generating a Bearer Token for **/CMDB/v2/data/ldg** Endpoint](https://lucidum.io/docs/authentication-in-api-v2/#generating_an_action_bearer_token) - For all other endpoints, see the section…"
url: "https://lucidum.io/docs/authentication-in-api-v2/"
updated: "2026-06-10"
category: Meridian API v2
---

# Authentication in API v2

This chapter describes how to authenticate with the Lucidum API v2. The steps are:

- Generate a token.

  - For LDG endpoints, see the section [Generating a Bearer Token for **/CMDB/v2/data/ldg** Endpoint](https://lucidum.io/docs/authentication-in-api-v2/#generating_an_action_bearer_token)
  - For all other endpoints, see the section on [generating a standard bearer token](https://lucidum.io/docs/authentication-in-api-v2/#generating_a_bearer_token) associated with you
- Include the bearer token in the header of each API request

## Generating a Bearer Token for **/CMDB/v2/data/ldg** Endpoint

The [**/CMDB/v2/data/ldg** endpoint](https://lucidum.io/docs/endpoints-for-ldg-data-only/) retrieves only enriched data from the Lucidum Data Group. This endpoint provides a more focused set of results for each asset or user.

To authenticate with the **/CMDB/v2/data/ldg **endpoint, use an ***action bearer token***. This bearer token allows a Lucidum account to access the **/CMDB/v2/data/ldg **endpoint.

**NOTE**: For all other APIs, [generate a standard bearer token](https://lucidum.io/docs/authentication-in-api-v2/#generating_a_bearer_token) associated with your Lucidum user account.

To generate the action bearer token:

1. Go to **Settings > User Management**.
2. Find your account. Click its ***Edit***link.
3. Ensure that your account is assigned the **Role*****Api_Users***.

   ![edit_user_api_role.png](https://lucidum.cloud/docs/edit_user_api_role.png)
4. In the **Edit User** page, in the ***Roles*** field, click *API_Users* and click the right arrow button.
5. Click **Save**.
6. Go to the **Actions** page (left menu > Actions icon).
7. Find an enabled action. Click on its tile.

   ![generate_action_token1.png](https://lucidum.cloud/docs/generate_action_token1.png)
8. In the page for the action, click the Token icon (in the upper left).
9. In the **Manage Action Tokens** page, click on the **Add Token** (plus-sign) icon.

   ![generate_action_token2.png](https://lucidum.cloud/docs/generate_action_token2.png)
10. Enter a name for the Action Token.

    ![generate_action_token3b.png](https://lucidum.cloud/docs/generate_action_token3b.png)
11. The new Action Token appears in the **Manage Action Tokens** page. Click the **View External API Script** (code) icon.

    ![generate_action_token4.png](https://lucidum.cloud/docs/generate_action_token4.png)
12. In the script, find the Action Token. Save it somewhere safe.

    ![generate_action_token5.png](https://lucidum.cloud/docs/generate_action_token5.png)
13. You can copy this script (copy icon) and use it within Python code to make API calls to the Lucidum LDG.

## Generating a Bearer Token for All Other Endpoints

To authenticate with the Lucidum API v2, use a bearer token. The bearer token allows a Lucidum account to access the Lucidum API. You can generate the bearer token from the Lucidum UI.

**NOTE**: Lucidum does not support SSO access for the Lucidum API.

To generate the Token:

1. Go to **Settings > User Management**.
2. Find your account. Click its ***Edit***link.
3. Ensure that your account is assigned the **Role*****Api_Users***.

   ![edit_user_api_role.png](https://lucidum.cloud/docs/edit_user_api_role.png)
4. In the **Edit User** page, in the ***Roles*** field, click *API_Users* and click the right arrow button.
5. In the **Edit User** page, click the button **Generate ClientID/Secret**.
6. Double-click on the ***Client ID*** field to copy the value. Save it somewhere safe.
7. Double-click on the ***Secret***field to copy the value. Save it somewhere safe.
8. Click the button **Generate Token**.
9. Double-click on the ***Token***field to copy the value. Save it somewhere safe. Lucidum will not display this value again.
10. Click the **Confirm**button.

## Authentication in the Header

To authenticate with the Lucidum API v2, include the bearer token or action bearer token in the header of each API request.

In Python, the header looks like this:

 `headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer quoVnYQeDNicAOywkOKq'
}`

In cURL the header looks like this:

 `--header 'Content-Type: application/json' 
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'`

where:

1. 1. - `quoVnYQeDNicAOywkOKq` is the [bearer Token we generated in the **Edit User** page](https://lucidum.io/docs/authentication-in-api-v2/#generating_a_bearer_token).
      - Content-Type is JSON.
