Expertise developer

WhatsApp Business Interactive Buttons: Boost your OTPs and Campaigns in Morocco

Guide to implementing interactive WhatsApp buttons (Copy code, CTA URL links, direct calls) to maximize engagement and ROI of your feeds in Morocco.

WhatsApp Business Interactive Buttons: Boost your OTPs and Campaigns in Morocco
Table of Contents
  1. Revolutionizing Customer Engagement in Morocco with WhatsApp Interactivity
  2. The 3 Types of Key Buttons in the WhatsApp Business API
  3. Implementing the /v1/messages API with Custom Buttons
  4. OTP validation and Automatic “Copy code” button
  5. Marketing ROI: Boost the conversion of your campaigns in Morocco

Revolutionizing Customer Engagement in Morocco with WhatsApp Interactivity

With more than 80% adoption rate in Morocco, WhatsApp has established itself as the preferred communication channel for Moroccans. But for businesses, sending simple text messages is no longer enough. The introduction of Interactive Buttons is transforming transactional and marketing communication. Whether it's copying a security code in one click or opening an order tracking link instantly without friction, interactive buttons boost click-through rates (CTR) by more than 40% compared to links inserted in traditional SMS messages.

The 3 Types of Key Buttons in the WhatsApp Business API

Our unified API now includes native management of three types of interactive buttons, adapted to all your operational needs:

• Copy Buttons (Copy Code): Specially designed for OTP. The user copies the verification code to their clipboard with a single tap.
• URL Action Buttons (Call-to-Action): Open a web link in the browser. Unlike plain text messages where links are inactive if the recipient hasn't saved your number, URL buttons remain clickable immediately.
• Call Buttons: Allow you to initiate a phone call to your customer service or support with a simple press.

The 3 Types of Key Buttons in the WhatsApp Business API

Implementing the /v1/messages API with Custom Buttons

To send messages containing custom interactive buttons, developers can use the "buttons" parameter in the API call. Here are typical examples for your software integrations.

// 1. Exemple de requête API avec boutons cURL curl -X POST https://api.envoisms.ma/v1/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": "+212612345678", "channel": "whatsapp", "body": "Votre colis est prêt ! Utilisez le bouton ci-dessous pour copier votre numéro de suivi.", "buttons": [ { "type": "copy", "text": "Copier le suivi", "copy_code": "TRK-99201-MA" }, { "type": "url", "text": "Suivre mon colis", "url": "https://envoisms.ma/tracking" } ] }'
// 2. Exemple d'intégration en Node.js const axios = require('axios'); async function sendInteractiveWA() { try { const response = await axios.post('https://api.envoisms.ma/v1/messages', { to: '+212612345678', channel: 'whatsapp', body: 'Merci pour votre confiance. Besoin d\'aide ? Appelez-nous ou visitez le site.', buttons: [ { type: 'url', text: 'Boutique en ligne', url: 'https://envoisms.ma' }, { type: 'call', text: 'Appeler le Support', phone_number: '+212612345678' } ] }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }); console.log('ID Message:', response.data.id); } catch (err) { console.error(err.response.data); } } sendInteractiveWA();

OTP validation and Automatic “Copy code” button

For two-factor authentication (2FA) use cases, the /v1/verify/send API has been enriched. Now, any submission of validation code in the WhatsApp channel automatically generates and injects the "Copy Code" button seamlessly, without you having to modify your existing request structures. You can also customize the button label (eg: "Copy Code") by passing the optional parameter "otp_button_text". This eliminates any authentication friction for the Moroccan user.

// Requête API OTP avec bouton de copie personnalisé curl -X POST https://api.envoisms.ma/v1/verify/send \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": "+212612345678", "channel": "whatsapp", "brand": "MaBoutique", "otp_button_text": "Copy OTP Code" }'

Marketing ROI: Boost the conversion of your campaigns in Morocco

For your direct marketing campaigns, the interactivity of the buttons allows you to establish a frictionless direct sales funnel. Integrated directly into your mass campaign feeds, the buttons redirect your subscribers instantly to your WooCommerce or Shopify stores, or to dedicated support lines. The API tracks delivery in real-time via webhooks, allowing you to instantly compare the profitability of your traditional SMS campaigns against the new interactive WhatsApp Business routes.

Why choose EnvoiSMS for your business?

Carrier Delivery

Local routes to IAM, Orange and Inwi, with automatic failover between routes and delivery status sent by webhook.

Cost Optimization

WhatsApp Business API from 0.65 MAD per message with optimal ROI.

Sovereign Data (CNDP)

Full compliance with Moroccan personal data protection regulations (CNDP).

Do interactive WhatsApp buttons require model validation by Meta?
Dynamic buttons sent through our gateway's interactive API do not require prior template approval from Meta when integrated into an active 24-hour customer service session.
What is the limit of buttons allowed per message?
As per the WhatsApp API technical specifications, each message can have a maximum of 3 interactive buttons.
Is the length of text displayed on a button limited?
Yes, the text of each button (label) must not exceed 25 characters to display correctly on all smartphones (Android and iOS).

Suggested Articles

Laravel SMS Notification Channel for Morocco: Complete Guide
developer

Laravel SMS Notification Channel for Morocco: Complete Guide

Inbound Webhooks: Connect TikTok & Meta Lead Ads Directly to WhatsApp for Instant Conversion
developer

Inbound Webhooks: Connect TikTok & Meta Lead Ads Directly to WhatsApp for Instant Conversion

WhatsApp Flows: Native In-Chat Forms for COD Order Verification in Morocco
developer

WhatsApp Flows: Native In-Chat Forms for COD Order Verification in Morocco