Install and configure the Hypersender Laravel SDK first. You need an active WhatsApp instance and the OTP API credentials in your Laravel environment.
Generate and deliver a link
The SDK returns Laravel’s HTTP clientResponse. The API response contains the generated WhatsApp URL at data.whatsapp_link.
chatId is the recipient’s WhatsApp chat ID. The SDK’s expires parameter accepts a lifetime from 60 to 3600 seconds. Keep API credentials in server-side configuration and avoid logging the returned link or OTP code.
What happens after generation
- Deliver the returned
data.whatsapp_linkto the user. - The user opens WhatsApp and sends the prefilled message.
- Your application handles the success or failure callback URL if you configured one.
- Continue the login or verification flow only after your server has confirmed the verification result.