Integrations v1.0 7 min read

WhatsApp Business integration

Learn how to integrate WhatsApp Business API with Wasapia for automated messaging and customer support

WhatsApp Business integration

Connect your WhatsApp Business account to Wasapia for automated messaging, customer support, and seamless communication.

What is WhatsApp Business integration?

The WhatsApp Business API integration allows you to:

  • Send and receive WhatsApp messages programmatically
  • Automate customer support conversations
  • Create message flows and templates
  • Manage contacts and conversations
  • Integrate with other business systems

Requirements

Before you start, ensure you have:

  • A verified WhatsApp Business account
  • Access to Meta Business Manager
  • WhatsApp Business API credentials
  • A verified phone number for your business
  • HTTPS domain for webhook configuration

Getting your credentials

1. Access Meta Business Manager

  1. Go to business.facebook.com
  2. Log in with your Meta Business account
  3. Navigate to your WhatsApp Business account

2. Find your API credentials

You'll need four key pieces of information:

Bearer Token

  • Navigate to WhatsApp → API Setup
  • Copy your Access Token (this is your Bearer Token)
  • Ensure it has the necessary permissions for messaging

Business ID

  • Go to Business Settings → Business Info
  • Copy your Business ID from the business details

Phone ID

  • In WhatsApp → API Setup
  • Find your Phone Number ID under the phone number section
  • This identifies your specific WhatsApp phone number

Phone Number

  • The phone number associated with your WhatsApp Business account
  • Must include country code (e.g., +1234567890)

Setting up the integration

1. Access integration settings

  1. Log in to your Wasapia dashboard
  2. Navigate to Settings → Integrations
  3. Click Connect next to WhatsApp Business

2. Enter your credentials

Fill in the required information:

Bearer Token: [Your WhatsApp API Access Token]
Business ID: [Your Meta Business ID]
Phone ID: [Your WhatsApp Phone Number ID]
Phone Number: +[Your business phone number]

3. Test the connection

Click Connect WhatsApp Business to validate your credentials. Wasapia will:

  • Verify your bearer token
  • Check phone number information
  • Generate webhook credentials
  • Activate the integration

Webhook configuration

After successful integration, you need to configure webhooks in Meta Business Manager to receive messages.

1. Get webhook details

From your Wasapia integration settings, copy:

  • Webhook URL
  • Verify Token: Unique secure token

2. Configure in Meta Business Manager

  1. Open Meta Business Manager
  2. Go to WhatsApp → Configuration → Webhooks
  3. Click Edit next to your webhook configuration
  4. Enter the following:
    • Callback URL: Paste your Webhook URL
    • Verify Token: Paste your Verify Token
  5. Click Verify and Save

3. Subscribe to webhook fields

Ensure you're subscribed to:

  • messages - To receive incoming messages
  • message_status - To track message delivery

4. Save configuration

Click Save to complete the webhook setup.

Testing your integration

1. Send a test message

  1. In Wasapia, go to Integrations → WhatsApp Business
  2. Click Test Integration
  3. Enter a phone number and test message
  4. Click Send Test Message

2. Verify message delivery

  • Check that the message was delivered to the recipient
  • Verify that delivery status is updated in Wasapia
  • Test incoming message reception by replying to your test message

Common issues and troubleshooting

Invalid credentials error

Problem: "Invalid credentials" error during setup

Solutions:

  • Verify your Bearer Token is valid and has messaging permissions
  • Ensure Business ID and Phone ID are correct
  • Check that your WhatsApp Business account is active

Webhook verification failed

Problem: Webhook URL verification fails in Meta Business Manager

Solutions:

  • Ensure your domain is accessible via HTTPS
  • Verify the webhook URL is exactly as provided by Wasapia
  • Check that the verify token matches exactly
  • Confirm your server is responding to webhook verification requests

Messages not being received

Problem: Outgoing messages work but incoming messages don't appear

Solutions:

  • Verify webhook is properly configured and verified
  • Check that you're subscribed to the "messages" webhook field
  • Ensure your webhook endpoint is responding with HTTP 200
  • Review webhook logs in Meta Business Manager

Phone number not verified

Problem: Phone number shows as unverified

Solutions:

  • Complete phone number verification in WhatsApp Business
  • Ensure the number is approved for messaging
  • Wait up to 24 hours for verification to complete

Best practices

Security

  1. Keep credentials secure

    • Never share your bearer token publicly
    • Store webhook verify token securely
    • Rotate tokens regularly as recommended by Meta
  2. Monitor usage

    • Track API rate limits
    • Monitor webhook response times
    • Set up alerts for failed deliveries

Message management

  1. Respect rate limits

    • Follow WhatsApp Business API rate limits
    • Implement queue management for high-volume messaging
    • Use message templates for marketing messages
  2. Handle errors gracefully

    • Implement retry logic for failed messages
    • Handle webhook validation properly
    • Log errors for debugging

Compliance

  1. Follow WhatsApp policies

    • Respect user opt-in/opt-out preferences
    • Use approved message templates
    • Maintain conversation quality scores
  2. Data protection

    • Implement proper data encryption
    • Follow GDPR and privacy regulations
    • Secure customer conversation data

Audio message transcription

Wasapia automatically transcribes audio messages to text using OpenAI's Whisper API when you have both WhatsApp Business and ChatGPT integrations active.

How it works

  1. Audio detection: When a voice message is received, Wasapia identifies it automatically
  2. Audio download: The audio file is downloaded from WhatsApp Business API
  3. Transcription: Audio is transcribed to text using OpenAI Whisper
  4. AI processing: The transcribed text is processed by your ChatGPT agent
  5. Response: AI responds based on the transcribed content

Supported audio formats

  • MP3 (.mp3)
  • MP4 Audio (.mp4, .m4a)
  • WAV (.wav)
  • OGG (.ogg)
  • WebM (.webm)
  • AMR (.amr)
  • 3GPP (.3gp)

Requirements for audio transcription

  • Active WhatsApp Business integration
  • Active ChatGPT integration (uses same API key for Whisper)
  • Audio messages under 25MB
  • Supported audio format

Example audio message handling

When a user sends a voice message with ID like wamid.HBgLMzQ2MDAzMDQyNDQVAgASGBQzQTI3NTU1NEUxRDE5MjIyRTRFOAA=:

  1. Wasapia downloads the audio file from WhatsApp
  2. Transcribes it to text: "Hello, I need help with my order"
  3. Processes the text with your AI agent
  4. Responds appropriately based on the transcribed content

Troubleshooting audio transcription

Audio not being transcribed:

  • Ensure ChatGPT integration is active and configured
  • Check that audio format is supported
  • Verify audio file is under 25MB limit
  • Review logs for transcription errors

Poor transcription quality:

  • Audio quality affects transcription accuracy
  • Background noise can impact results
  • Very short audio clips may not transcribe well
  • Consider asking users to speak clearly

Advanced features

Message templates

Create approved message templates for:

  • Welcome messages
  • Order confirmations
  • Support notifications
  • Marketing campaigns

Flow integration

Combine with Wasapia flows to:

  • Automate customer onboarding
  • Create interactive conversation flows
  • Implement chatbot functionality
  • Route conversations to human agents

Analytics and reporting

Monitor your WhatsApp integration with:

  • Message delivery rates
  • Response times
  • Conversation analytics
  • Customer satisfaction metrics

Getting help

If you need assistance:

  1. Check webhook logs in Meta Business Manager
  2. Review error messages in your Wasapia dashboard
  3. Contact support with your integration ID and error details
  4. Visit the help center for additional troubleshooting guides

For technical support, include:

  • Your business ID
  • Error messages or screenshots
  • Timestamp of the issue
  • Steps to reproduce the problem

Share this documentation

On this page