Install and configure the Hypersender Python 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 adict. The generated WhatsApp URL is at result["data"]["whatsapp_link"].
chat_id is the recipient’s WhatsApp chat ID. The 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.