Hypersender
FeaturesOTPLaravel SDKUse casesMCPPricingFAQsDocsBlog
Sign InGet Started
Hypersender

Product

  • Features
  • Use cases
  • MCP server
  • Pricing
  • WhatsApp API pricing
  • Laravel SDK
  • Docs

Resources

  • FAQ
  • Blog
  • Discord
  • WhatsApp

Legal

  • Terms and Conditions
  • Privacy Policy

© 2026 Hypersender. All rights reserved.

Featured on LaunchAFGET IT ONGoogle Play
HypersenderHypersenderHypersenderHypersenderHypersender
All articles

Developer guides

How to Send WhatsApp Messages in Laravel

Install the Hypersender Laravel SDK, send your first WhatsApp message, and handle queued requests and webhooks in your Laravel app.

Hypersender·December 11, 2025·3 min read
Vertical waves of green light flowing over a dark background
On this page
  1. What You'll Need
  2. Installation
  3. Sending Your First Message
  4. Sending Different Message Types
  5. Images
  6. Videos
  7. Documents
  8. Location
  9. Using Queues for Better Performance
  10. Handling Incoming Messages
  11. Common Issues
  12. Messages Not Sending
  13. Invalid Chat ID Format
  14. Rate Limiting
  15. Next Steps

On this page

  1. What You'll Need
  2. Installation
  3. Sending Your First Message
  4. Sending Different Message Types
  5. Images
  6. Videos
  7. Documents
  8. Location
  9. Using Queues for Better Performance
  10. Handling Incoming Messages
  11. Common Issues
  12. Messages Not Sending
  13. Invalid Chat ID Format
  14. Rate Limiting
  15. Next Steps

Need to send a WhatsApp message from Laravel? This guide walks through connecting a number to Hypersender, installing the Laravel SDK, and sending a first message. It also covers queued jobs and incoming-message webhooks. For the complete, current package reference, see the Laravel SDK documentation.

Hypersender connects a WhatsApp account by QR code. It is a separate service from Meta's official WhatsApp Business Platform. Review the WhatsApp API plans and account requirements before choosing it for a production workflow.

What You'll Need

Before getting started, you need:

  • A Laravel application (8.x or higher)
  • PHP 8.2+
  • A Hypersender account (sign up here)
  • Your API key and Instance ID from the Hypersender dashboard

Installation

Install the Hypersender SDK via Composer:

bash
composer require hypersender/hypersender-laravel

Publish the config file:

bash
php artisan vendor:publish --tag=hypersender-config

Add your credentials to your .env file:

env
HYPERSENDER_WHATSAPP_API_KEY=your_api_key
HYPERSENDER_WHATSAPP_INSTANCE_ID=your_instance_id

You can find your API key and Instance ID in your Hypersender dashboard under Settings.

Sending Your First Message

Here's the simplest way to send a WhatsApp message:

php
use Hypersender\Hypersender;
 
$response = Hypersender::whatsapp()->safeSendTextMessage(
    '20123456789@c.us',
    'Hello from Laravel!'
);
 
// Throw an exception for a non-success HTTP response.
$response->throw();
 
// V2 queues the message; this is a queue ID, not a delivery receipt.
$queuedRequestUuid = $response->json('queued_request_uuid');

Run this from a Laravel controller or php artisan tinker after setting the credentials above. The chat ID format is the phone number with country code followed by @c.us; for example, +1 (202) 555-0123 becomes 12025550123@c.us. A successful HTTP response confirms that the API accepted the queued request, not that WhatsApp delivered the message. See the queued requests guide to track processing.

The SDK also provides a safeSendTextMessage helper. Confirm its current behavior in the send messages reference; helper names do not guarantee that an account will avoid restrictions. Send only messages that comply with applicable WhatsApp terms and recipient expectations.

Sending Different Message Types

Images

php
Hypersender::whatsapp()
    ->sendImageUrl(
        chatId: '20123456789@c.us',
        url: 'https://example.com/image.jpg',
        fileName: 'image.jpg',
        mimeType: 'image/jpeg',
        caption: 'Check this out!'
    );

For uploads, pass an Illuminate\Http\UploadedFile to the SDK's sendImageFile method. See the Laravel image methods for its current parameters.

Videos

php
Hypersender::whatsapp()
    ->sendVideoUrl(
        chatId: '20123456789@c.us',
        url: 'https://example.com/video.mp4',
        asNote: false,
        caption: 'Tutorial video'
    );

Documents

php
Hypersender::whatsapp()
    ->sendFileUrl(
        chatId: '20123456789@c.us',
        url: 'https://example.com/invoice.pdf',
        fileName: 'invoice.pdf',
        mimeType: 'application/pdf',
        caption: 'Your invoice'
    );

Location

php
Hypersender::whatsapp()
    ->sendLocation(
        chatId: '20123456789@c.us',
        latitude: 37.7749,
        longitude: -122.4194,
        title: 'Our Office'
    );

Using Queues for Better Performance

Sending messages synchronously can slow down your app. Use Laravel queues to send messages in the background:

php
namespace App\Jobs;
 
use Hypersender\Hypersender;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
 
class SendWhatsAppMessage implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable;
 
    public function __construct(
        public string $chatId,
        public string $message
    ) {}
 
    public function handle(): void
    {
        Hypersender::whatsapp()
            ->safeSendTextMessage(
                chatId: $this->chatId,
                text: $this->message
            )
            ->throw();
    }
}

This Laravel queue runs the job in your application. The API separately queues each accepted message request; use the returned UUID and the queued requests guide to track it.

Dispatch the job:

php
SendWhatsAppMessage::dispatch($chatId, $message);

Handling Incoming Messages

The Laravel SDK registers a webhook route and dispatches typed events after signature verification. Follow the webhook handling guide to configure the route and listen for the event types supported by the installed SDK version.

Common Issues

Messages Not Sending

Make sure your WhatsApp number is connected in the Hypersender dashboard. You need to scan the QR code before you can send messages.

Invalid Chat ID Format

The chat ID must be in the format phonenumber@c.us. Don't include the + sign or any spaces. Just digits followed by @c.us.

Rate Limiting

Check the API response and current plan limits, confirm that the instance is connected, and review the SDK's queued requests guide for background processing. A helper method or delay does not guarantee delivery or prevent account restrictions.

Next Steps

Now that you know the basics, you can:

  • Set up webhook handling for two-way conversations
  • Check queued requests for API processing and message acknowledgements for delivery
  • Inspect and retry failed webhook deliveries
  • Explore the full API documentation

The complete SDK documentation is available at docs.hypersender.com.

Ready to send from your own app? Create a Hypersender account to get your API key and Instance ID.

Keep reading

Concentric rings of soft green light expanding from the center

Product updates

WhatsApp Message Capping

WhatsApp message capping limits how many new contacts you can message per cycle. See how Hypersender shows your quota and returns clear API errors.

August 15, 2026·2 min read

By Hypersender

Green lines converging on a single bright point in the dark

Product updates

WhatsApp Timelock Restrictions

Meta can temporarily restrict your WhatsApp number from messaging new contacts. Here is how Hypersender detects these restrictions and keeps you informed.

July 20, 2026·3 min read

By Hypersender

Layered green bands drifting across a deep dark background

Developer guides

Introducing Hypersender Laravel SDK

Easily integrate Hypersender into your Laravel applications with our new SDK.

December 11, 2025·4 min read

By Hypersender