WhatsApp Setup¶
This guide walks you through connecting WhatsApp to MotoRentals so your AI agent can respond to customer messages.
Time Required
First-time setup takes 15-30 minutes. You'll need a Meta (Facebook) Business account.
Overview¶
MotoRentals uses the WhatsApp Cloud API to send and receive messages. You'll need:
- A Meta Business account
- A WhatsApp Business phone number
- Two credentials from Meta: Phone Number ID and Access Token
Step 1: Create a Meta Business Account¶
If you don't have a Meta Business account:
- Go to business.facebook.com
- Click Create Account
- Enter your business name, your name, and email
- Follow the verification steps
Business Verification
Meta may require business verification for full API access. This can take 1-3 days. You can still test with limited messages while waiting.
Step 2: Create a Meta App¶
- Go to developers.facebook.com
- Click My Apps → Create App
- Select Business as the app type
- Enter an app name (e.g., "Krabi Rentals WhatsApp")
- Select your Business Account
- Click Create App
Step 3: Add WhatsApp to Your App¶
- In your app dashboard, find Add Products
- Find WhatsApp and click Set Up
- Select your Business Account when prompted
Step 4: Add a Phone Number¶
You have two options:
Option A: Use a Test Number (Quick Start)¶
Meta provides a free test number for development:
- Go to WhatsApp → API Setup in your app
- You'll see a test phone number already configured
- This works for testing but shows "Meta" as the sender
Option B: Add Your Business Number (Recommended)¶
To use your own number:
- Go to WhatsApp → API Setup
- Click Add phone number
- Enter your business phone number
- Verify via SMS or voice call
- Complete the display name review (24-48 hours)
Phone Number Requirements
- The number cannot be registered with regular WhatsApp
- You'll need to migrate it to WhatsApp Business API
- Once migrated, you can't use it with the regular WhatsApp app
Step 5: Get Your Phone Number ID¶
- Go to WhatsApp → API Setup
- Find Phone number ID under your number
- Copy this value (looks like:
123456789012345)

Step 6: Generate an Access Token¶
Option A: Temporary Token (Testing)¶
- In API Setup, find Temporary access token
- Click Generate
- Copy the token
Temporary tokens expire in 24 hours
Use a permanent token for production.
Option B: Permanent Token (Production)¶
- Go to Business Settings → System Users
- Click Add to create a system user
- Name it (e.g., "MotoRentals API")
- Set role to Admin
- Click Generate Token
- Select your app
- Add these permissions:
whatsapp_business_messagingwhatsapp_business_management
- Click Generate Token
- Copy and save the token securely
Save Your Token
The token is only shown once. Store it securely.
Step 7: Configure the Webhook¶
MotoRentals needs to receive messages from WhatsApp:
- Go to WhatsApp → Configuration
- Find Webhook
- Click Edit
- Enter these values:
| Field | Value |
|---|---|
| Callback URL | https://krabi.yourads.io/whatsapp/webhook |
| Verify Token | motorentals_webhook_verify_2024 |
- Click Verify and Save
- Subscribe to these webhook fields:
messagesmessage_status(optional)
Step 8: Enter Credentials in MotoRentals¶
- Log in to your MotoRentals Dashboard
- Go to Settings or complete the Setup Wizard
- Enter your:
- Phone Number ID
- Access Token
- Click Test Connection
- If successful, click Save
Testing Your Setup¶
Send a WhatsApp message to your business number. You should:
- See the message in your MotoRentals dashboard
- Receive an AI-generated response on WhatsApp
Test Message
Try sending: "Hi, I want to rent a scooter for tomorrow"
Troubleshooting¶
"Webhook verification failed"¶
- Check the Callback URL is exactly correct
- Ensure your server is running and accessible
- Verify the token matches
"Messages not received"¶
- Check webhook subscriptions include
messages - Verify the phone number is active
- Check the access token hasn't expired
"Messages sent but no response"¶
- Verify the AI agent is enabled in settings
- Check you have bikes in your inventory
- Review the conversation logs in dashboard
Next Steps¶
- Set up Telegram for staff notifications
- Add your bikes to enable bookings