# Meta WhatsApp Account Setup

Use this page when you need the full Meta-side setup before activating WhatsApp inside Hostel Mate.

If you already have a working Meta app and only need the Hostel Mate fields, go to [WhatsApp Integration Setup](https://docs.hostelmate.co/finance-management/notifications/whatsapp-integration).

### What You Need To Create

Before WhatsApp can be activated in Hostel Mate, Meta needs to provide these pieces:

* A **Meta Developer Account**
* A **Meta Business Account**
* A **Meta App** with the **WhatsApp** product enabled
* A **Phone Number ID**
* A **Permanent Access Token**
* A **System User ID**
* A webhook connected to your backend

### Before You Start

Make sure you have:

* Access to the email address that will own the Meta app
* Access to the Meta business portfolio you want to use
* A phone number that can be connected to WhatsApp
* Access to your Hostel Mate backend details for the webhook step

### Step 1: Create Or Open Your Meta Developer Account

1. Open the [Meta App Dashboard](https://developers.facebook.com/apps/).
2. Sign in with the Meta account that should own the integration.
3. If this is your first Meta developer project, complete the developer account setup prompts.
4. Keep using the same Meta account for the rest of the setup so the app, business assets, and system user stay under one owner.

### Step 2: Prepare The Meta Business Side

1. Make sure you have a **Meta Business Account** or **Business Portfolio** available.
2. If you do not already have one, create it during the app setup flow when Meta asks for a business.
3. Use the business account that should own the phone number and WhatsApp activity long term.
4. Finish any email confirmation Meta requires before continuing.

### Step 3: Create The Meta App

1. In the Meta App Dashboard, click **Create App**.
2. Select **Business** as the app type.
3. Enter the **App Name** and **Contact Email**.
4. Select the correct **Business Portfolio** if Meta shows that option.
5. Create the app and confirm with your Meta password if asked.

### Step 4: Enable WhatsApp On The App

1. After the app is created, go to **Add Products to Your App**.
2. Find **WhatsApp** and click **Set Up**.
3. Choose the business account you want linked to this app.
4. Confirm any prompts Meta shows for the business connection.

At this point, the app exists, but you still need the WhatsApp-specific credentials.

### Step 5: Configure The WhatsApp Product

1. In the Meta app, open **WhatsApp > Quickstart**.
2. Under **Select Business Portfolio**, choose the business portfolio you want to use.
3. Move to **WhatsApp > API Setup**.
4. Copy the **Temporary Access Token** so you can test the connection.
5. Copy the **Phone Number ID** shown under the phone number step.
6. Add your own number in the **To** field and send a test message.
7. Open **App Settings > Basic** and copy the **App ID** and **App Secret**.

Save these values somewhere safe while you continue:

* App ID
* App Secret
* Temporary Access Token
* Phone Number ID

### Step 6: Generate A Permanent Access Token

The temporary token expires quickly, so Hostel Mate should use a permanent token instead.

1. In the Meta App Dashboard, go to **Business Settings**.
2. Open **Users > System Users**.
3. Click **Add** and create a **System User**.
4. Give the system user the appropriate role, usually **Admin** or **Developer**.
5. Under **Assigned Assets**, add your app and enable **Manage App**.
6. Click **Generate Token** for that system user.
7. Choose the Meta app you created for WhatsApp.
8. Enable these permissions:
   * `whatsapp_business_messaging`
   * `whatsapp_business_management`
9. Generate the token and copy it immediately.

Save these values as well:

* Permanent Access Token
* System User ID

### Step 7: Connect The Webhook

1. In the Meta app, open **WhatsApp > Configuration**.
2. Under **Webhook**, click **Edit**.
3. Set **Callback URL** to `https://app-whpbk.hostelmate.co/webhook`.
4. Enter a **Verify Token** that your backend expects.
5. Click **Verify and Save**.
6. In **Webhook Fields**, enable **messages**.

This is what allows incoming WhatsApp messages and delivery events to reach your system.

### Step 8: Add The Values In Hostel Mate

When the Meta side is ready, use these values in Hostel Mate:

* **WhatsApp Token**: your permanent access token
* **WhatsApp Phone**: the connected phone number
* **WhatsApp SID**: your system user ID
* **WhatsApp Number ID**: the phone number ID from Meta

If you only need the Hostel Mate activation side, continue in [WhatsApp Integration Setup](https://docs.hostelmate.co/finance-management/notifications/whatsapp-integration).

### Activation Checklist

Use this checklist before you mark the setup complete:

* The Meta app exists
* The WhatsApp product is enabled
* The correct business portfolio is linked
* A test message works
* The permanent token is generated
* The webhook is verified
* The `messages` field is enabled
* Hostel Mate has the token, phone, SID, and number ID

### Related Pages

* WhatsApp integration inside Hostel Mate: [WhatsApp Integration Setup](https://docs.hostelmate.co/finance-management/notifications/whatsapp-integration)
* Notifications overview: [Guest Notifications](https://docs.hostelmate.co/finance-management/notifications)
