> For the complete documentation index, see [llms.txt](https://docs.lumiid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lumiid.com/api-integration/technical-references/lumiid-api-authentication-or-api-keys-sandbox-and-production.md).

# LumiID API Authentication | API Keys, Sandbox & Production

## LumiID API keys and authentication

Authenticate LumiID API requests with your API key. Create an API key, secure it, and select sandbox or production.

Every LumiID API request requires authentication. This keeps requests secure, traceable, and authorized.

***

### Create an API key

Create an API key in the LumiID Dashboard before making API requests. LumiID creates an application for the API key automatically.

1. Sign in to the LumiID Dashboard.
2. Navigate to **Developers → Applications**.
3. Create an API key.
4. Provide:
   * **Application Name**
   * **Description** (optional)
   * **Logo** (optional)
5. Save the API key.

Use the generated API key to authenticate LumiID API requests.

***

### Get API keys

LumiID generates an API key when you create it.

Your API key:

| Credential  | Description                                           |
| ----------- | ----------------------------------------------------- |
| **API Key** | Private credential used to authenticate API requests. |

Your API key provides account access. Use it only in secure server-side environments.

> **Security Best Practice**
>
> * Never expose your API key in frontend applications.
> * Never commit your API key to GitHub or other public repositories.
> * Store credentials securely using environment variables or a secrets manager.
> * Rotate your API keys immediately if you suspect they have been compromised.

You can regenerate API keys from the LumiID Dashboard.

***

### Choose sandbox or production

LumiID provides separate environments for testing and production deployments.

| Environment    | Base URL                    |
| -------------- | --------------------------- |
| **Sandbox**    | `https://api.lumiid.com/v1` |
| **Production** | `https://api.lumiid.com/v1` |

Use the **Sandbox** environment to build and test your integration without affecting live systems. Switch to the **Production** environment only after your integration has been validated.

> Always send requests over **HTTPS**.

***

### Authenticate API requests

Authenticate every request by including your API credentials in the request headers.

```http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

#### Example Request

```bash
curl --request POST \
https://sandbox-api.lumiid.com/v1/nin/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "nin": "12345678901"
}'
```

If your credentials are valid, LumiID will process your request and return a JSON response.

***

### Track API requests

For easier debugging and auditing, you can attach a unique reference to each API request using the `customer_reference` query parameter.

This value appears in your API logs and dashboard, making it easy to trace individual transactions.

#### Example

```
POST https://api.lumiid.com/v1/ng/nin-basic/
```

You can use any unique value, such as:

* Transaction ID
* Customer ID
* Order Number
* Session ID
* Invoice Number

Using unique references is recommended for production integrations.

***

### API authentication checklist

Before making your first API request, ensure that you have:

* Created an API key.
* Stored your API key securely.
* Selected the correct environment (Sandbox or Production).
* Included the required authentication headers.
* Used HTTPS for all requests.
* Added a `customer_reference` for request tracking (recommended).

***

### Integrate verification APIs

Your application can now call LumiID verification APIs.

* [NIN Verification API](/api-integration/government-verification/nin-verification-api-or-nigerian-national-id-lookup.md)
* [BVN Verification API](/api-integration/government-verification/bvn-verification-api-or-nigerian-bank-verification-number-lookup.md)
* [CAC Business Verification API](/api-integration/business-verification/cac-business-verification-api-or-nigerian-rc-number-lookup.md)
* [API Response Codes and Error Handling](/api-integration/technical-references/lumiid-api-error-codes-and-http-response-handling.md)
* [Identity Verification Glossary](/api-integration/technical-references/identity-verification-glossary-or-kyc-kyb-and-fraud-terms.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lumiid.com/api-integration/technical-references/lumiid-api-authentication-or-api-keys-sandbox-and-production.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
