The Send Message Module in Hypersender’s Laravel SDK allows you to send and manage SMS messages programmatically. This guide provides a comprehensive overview of the available methods and how to use them effectively in your Laravel applications through your Android Phone.
Send a new SMS message to be sent by your android phone. (learn more)
Basic Usage
Parameters
use Hypersender\Hypersender;Hypersender::sms() ->sendMessage( content: 'Hello, this is a test message!', requestId: 'e7b8a3c0-2d1a-4f9b-9f6c-1b2c3d4e5f6a', to: '+1234567890', // Optional parameters // scheduleSendAt: '2025-01-01 12:00:00', // maxSendAttempts: 3, // messageExpirationSeconds: 120, );
Parameter
Type
Required
Description
content
string
yes
The content of your SMS message
requestId
string
yes
A unique identifier you can later use to find this message (preferably a UUID)
to
string
yes
The recipient’s phone number (e.g. +201234567890)
scheduleSendAt
string
no
Optional date-time to schedule sending (e.g. 2025-01-01 12:00:00). You can schedule up to 3 days ahead (relative to your phone timezone).
maxSendAttempts
int
no
How many times to retry sending if it fails. Max: 15.
messageExpirationSeconds
int
no
Message validity window in seconds (useful for OTPs, e.g. 120 for 2 minutes).