Install and configure the Hypersender Go SDK first. You need an active WhatsApp instance and the OTP API credentials in your environment.
Generate and deliver a link
The SDK returns the parsed JSON response as ahypersender.Result (a map[string]any). The generated WhatsApp URL is at res["data"]["whatsapp_link"].
chatID is the recipient’s WhatsApp chat ID. The Expires field 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.