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

# Authentication

> Generate SMS API credentials and authenticate requests using Basic Auth or an access token.

<Steps>
  <Step title="Create a Beem account">
    Create a free account at:

    **[https://login.beem.africa](https://login.beem.africa)**

    After registering, verify your email address and phone number. You'll receive a confirmation email — click the verification link to activate your account.

    If you have trouble completing email or phone verification, contact [support@beem.africa](mailto:support@beem.africa).
  </Step>

  <Step title="Sign in">
    Log in to the Beem Dashboard using your username and password.
  </Step>

  <Step title="Prepare your Sender ID">
    Before sending SMS messages, ensure you have an **active Sender ID**.

    <Warning>
      The default Sender ID **INFO** has been disabled for all accounts. Replace it with your approved Sender ID in every API request.
    </Warning>
  </Step>

  <Step title="Generate API credentials">
    Navigate to:

    **SMS → API Setup**

    Click **Generate API Key & Secret**.

    The generated credentials are required to authenticate every request to the SMS API.

    <Warning>
      Your API Secret is shown **only once**. Store it securely, as it cannot be retrieved later.
    </Warning>
  </Step>
</Steps>

***

## Authentication methods

All SMS API requests require authentication. Use **HTTP Basic Authentication** (API Key and Secret) or pass an **access token** in the `Authorization` header. Use one method per request — not both.

## Request headers

| Header         | Type   | Description                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------- |
| `Content-Type` | string | `application/json` — used for JSON requests. `application/xml` — used for XML requests. |

<Tabs>
  <Tab title="API Key & Secret">
    | Header          | Value                                   |
    | --------------- | --------------------------------------- |
    | `Authorization` | `Basic base64(api_key:secret_key)`      |
    | `Content-Type`  | `application/json` or `application/xml` |

    * **Username:** API Key
    * **Password:** API Secret

    ```http theme={null}
    POST /v1/send HTTP/1.1
    Host: apisms.beem.africa
    Authorization: Basic <base64-encoded-api_key:secret_key>
    Content-Type: application/json
    ```
  </Tab>

  <Tab title="Access Token">
    | Header          | Value                                   |
    | --------------- | --------------------------------------- |
    | `Authorization` | `<access-token>`                        |
    | `Content-Type`  | `application/json` or `application/xml` |

    Pass your access token directly — **do not** use a `Bearer` prefix.

    ```http theme={null}
    POST /v1/send HTTP/1.1
    Host: apisms.beem.africa
    Authorization: <access-token>
    Content-Type: application/json
    ```
  </Tab>
</Tabs>

<Warning>
  Never expose your API Key, API Secret, or access token in frontend applications or public repositories.
</Warning>
