# API Key Settings

The **API Key** section in WhatsApp Bot Settings allows you to connect your BotPenguin WhatsApp bot with a custom-developed application using WhatsApp Cloud API. This enables programmatic message handling, automation, and advanced integrations.

***

### Accessing WhatsApp API Key Settings

To access the API Key section:

1. Log in to your **BotPenguin Dashboard**
2. Select the WhatsApp bot you want to configure
3. Navigate to **Settings**

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FWrINDv4YzBITtjCCiHfI%2Fimage.png?alt=media&#x26;token=be19bd84-9652-42df-aac7-ddd746c2dd41" alt=""><figcaption></figcaption></figure>

4. Click on the **API Key** tab

Here, you will find the **WhatsApp API Credentials** and **Webhook URL** configuration.

***

### Step 1: Copy the WhatsApp API Token

* In the **WhatsApp API Credentials** section, you will see a masked API key.
* Click on Generate Api key button.
* Click the **Copy** icon to copy the token.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2Fg0GnrcuaSdY2l5PmQhRT%2Fimage.png?alt=media&#x26;token=8201f606-6bd6-4e20-82cf-61a6e98500aa" alt=""><figcaption></figcaption></figure>

* Paste this token into the **development application** you are using to integrate with the WhatsApp Cloud API.

This API token is required for authenticating requests from your application to BotPenguin.

***

### Step 2: Retrieve Required Details from WhatsApp Cloud API

Once the API token is pasted into your development application and the integration is initialized, you will receive the following details:

1. **Phone Number ID**
2. **WhatsApp Business (WABA) ID**

These values are generated by Meta (WhatsApp Cloud API) and are required for completing the WhatsApp bot setup.

***

### Step 3: Generate System Access Token from Meta

To generate the **System Access Token**, follow these steps:

1. Go to **business.facebook.com**
2. Navigate to **Business Settings**
3. Open **Applications**
4. Go to **System Users**
5. Create a new System User (or select an existing one)
6. Assign **Admin Access** (not Employee access)
7. Generate a **System Access Token** for the WhatsApp application

⚠️ **Important Notes:**

* The system access token will be visible **only once**
* Copy and store it securely
* This token is mandatory for WhatsApp Cloud API authentication

***

### Step 4: Configure WhatsApp Cloud API Details

Enter the following details into the **WhatsApp Cloud API** section of your setup:

* **Phone Number ID**
* **WhatsApp Business (WABA) ID**
* **System Access Token**

Once all three fields are correctly filled, click **Continue** to proceed with creating your WhatsApp bot manually.

***

### Webhook URL Configuration (Optional but Recommended)

* Enter your **Webhook URL** to receive real-time message events from WhatsApp
* You can add custom headers if required
* Click **Test** to verify the webhook
* Click **Set Webhook URL** to save

***

If everything is correct and you are still unable to move forward, write to us at <support@botpenguin.com>. We will respond back within 48 business hours.
