# 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="/files/M5BdXXtB7DSPdkoY1pYy" 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="/files/oYIaAjlCagEERKTWft20" 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.


---

# Agent Instructions: 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:

```
GET https://help.botpenguin.com/bots/whatsapp-bot/whatapp-chatbot-settings/api-key-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
