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

# Authentication

> Learn how to generate and use API keys to authenticate with the Cashii API.

To interact with the Cashii API, your application needs to authenticate using an API key. This key acts as a secure credential, identifying your application and granting it specific permissions.

## Generating your API key

Before generating an API key, ensure you have set up your Cashii accounts:

<AccordionGroup>
  <Accordion title="1. Create a personal account" icon="user">
    If you haven't already, you must have a verified Cashii personal account. Follow the steps outlined in the [account creation video](https://www.facebook.com/app.cashi/videos/563796253186277) to set up your account.
  </Accordion>

  <Accordion title="2. Request a commercial account" icon="shop">
    API keys are associated with commercial accounts. After creating a personal account, request a commercial account. Refer to the commercial account setup guide for detailed instructions.

    <video controls className="w-full aspect-video" src="https://f003.backblazeb2.com/file/cashii-docs/videos/requesting-comercial-account.mp4" />
  </Accordion>
</AccordionGroup>

Once your commercial account is active, follow these steps to generate an API key:

1. Log in to the Cashii app and switch to your **commercial account**.
2. Open the navigation menu.
3. Navigate to **Manage Users**.
4. Select **Manage API Keys**.
5. Click **Add API Key**.
6. Enter a descriptive reference name for the API key (e.g., "My Web App Integration").
7. **Important:** Copy the generated API key immediately and store it securely. You will not be able to view it again after this step.
8. Enable the necessary permissions for this key. For payment integrations, ensure **Manage Remote Payments** is checked.
9. Click **Save**.

<Info>Keep your API keys confidential. Do not share them publicly or embed them directly in client-side code.</Info>

<video controls className="w-full aspect-video" src="https://f003.backblazeb2.com/file/cashii-docs/videos/create-api-key.mp4" />

## Using Your API Key

Include your API key in the `Authorization` header of your API requests, using the Bearer authentication scheme:

```http
Authorization: Bearer YOUR_API_KEY
```

Replace `YOUR_API_KEY` with the actual key you generated.
