LogoLogo
Become a PartnerStatus Page
  • get started
    • Welcome to 360Dialog
    • Quickstarts
      • Getting started as a partner
      • Register as a Meta Tech Provider
      • Add a WhatsApp Number
      • Set up Integrated Onboarding
      • Create a Message Template
      • Send a Message
    • Pricing & Billing
      • Payment Methods for BR: Pix & Boleto
      • Month Closing Invoice (MCI)
    • Get API Access
    • Tech Provider Program
      • Understanding the Meta Tech Provider Program
      • Becoming a Meta Tech Provider: A Step-by-Step Guide
  • MM Lite Beta Program
    • Onboarding
    • Sending Messages
    • Expected Errors & Programming Languages
  • Partner & Account Management
    • Solutions for Partners
      • Benefits for Partners
      • Partner Hub
      • WABA Management
    • Account Setup & Management
      • Prerequisites and best practices for account creation
      • Account Structure
      • Account Creation
  • Integrations & API Development
    • Webhook Events & Setup
      • Webhook Events (Partner & Messaging API)
      • Webhook Configuration & Management
    • Integration Best Practices
      • Architecture and Security
      • Best Practices for Designing Integrations
        • Design a Stable Webhook Receiving Endpoint
      • Sizing Your Environment Based on Expected Throughput
      • Design a Resilient Message Sending Service
      • Integrated Onboarding
        • Basic Integrated Onboarding
        • Custom Integrated Onboarding
        • Host Your Own Embedded Signup
      • API Key Authentication for the Partner API
  • API Reference
    • Messaging API
    • Messaging Health Status
    • Sandbox (Test API Key)
    • Differences Between Cloud API and On-Premise API for Partners
      • [will be deprecated] Messaging with On-Premise API
    • Partner API
  • WABA Management
    • Managing WABA Accounts
      • Using the Partner Hub to manage Clients and Channels
      • Using the Partner API to manage Clients and Channels
      • Partner Permission to Generate API Key
      • Checking Usage & Statistics
    • Phone Number & Hosting
      • Migrating a Phone Number
        • Migrate number from Meta or alternate BSP to 360Dialog
        • Migrate a phone number to a new WABA
        • Migrate a phone number to a new WABA to change messaging Currency
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
      • Hosting type Change (On-premise API to Cloud API)
    • WABA Profile & Compliance
      • Display Name Guidelines
      • WABA Profile Info
      • WABA Policy Enforcement
      • Business Account Verification
    • Partner change (between 360Dialog Partners)
    • WhatsApp Flows
    • Accelerated Onboarding
    • Business Account Verification
  • Messaging
    • Sending & Receiving Messages
      • Conversations
      • Receiving messages
      • Before sending a message
    • Message Types
      • Conversational Components
      • Checklist for Message Broadcasts and Campaigns
      • Text messages
      • Interactive messages
        • Single and Multi Product Messages
        • Location Request Messages
        • Address Messages (India and Singapore only)
      • Contacts & Location Messages
    • Template Messages
      • Template Library
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Media Messages
      • Upload, retrieve or delete media
    • Messaging Health & Troubleshooting
      • Messaging Limits & Quality Rating
      • Errors While Messaging
      • Messages statuses
  • Commerce & Payments
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore Only)
      • Receive WhatsApp Payments via Stripe
    • Products and Catalogs
      • India Businesses: Compliance for Commerce
  • Support & Updates
    • Help & Troubleshooting
      • FAQ
      • Error Code Reference
      • User Support Documentation
        • Tutorials
          • Page How to Troubleshoot Login Issues in the 360dialog Hub
          • How to Report an Issue
          • How to Contact Support
        • How-To Guides
          • Raise a support request
          • Requesting a Status Update for Business Verification
        • Reference
          • Troubleshooting Embedded Signup Issues
          • Commerce Policy Checks for WhatsApp API Access
          • Support Availability & SLAs
          • Incident Issue Prioritization
          • Case Types Table
        • Explanation
          • Why Business Verification Takes Time
          • Why Some Issues Are Not Emergencies
          • Understanding the Support Process
      • Support with Meta
    • Imprint & Data Privacy
    • Product Updates & News
      • How to ensure your Template Messages will be received
      • Integrated Onboarding new look and Campaigns Best Practices
Powered by GitBook
On this page
  • Expected Errors
  • Examples using multiple programming languages
  • 1. Postman Collection
  • 2. NodeJS (using request library)
  • 3. Python (using request library)

Was this helpful?

  1. MM Lite Beta Program

Expected Errors & Programming Languages

Expected Errors

MM Lite API is designed specifically for sending Marketing template messages. If you try to send any other message type—such as freeform, Authentication, Service, or Utility—you’ll receive an error response. These formats aren't supported in MM Lite.

It’s also important to note that MM Lite is a send-only API. It doesn’t support incoming messages from users. If your use case requires two-way communication, you’ll need to use the Cloud API alongside MM Lite on the same phone number to receive incoming messages and replies.

We demonstrated this dual setup in the Sandbox Testing guide, where Cloud API is used to receive incoming messages while MM Lite handles outbound marketing templates.


Using MM Lite API to send normal text messages

The expected error if we try to send a message which is not a Marketing template message is:

{
    "detail": {
        "error": {
            "message": "(#100) Invalid parameter",
            "type": "OAuthException",
            "code": 100,
            "error_data": {
                "messaging_product": "whatsapp",
                "details": "Message must be a template message."
            },
            "fbtrace_id": "AS8UhxdPr7P7WMufJGTGVGU"
        }
    }
}

Using MM Lite API to send Authentication/Utility templates

The expected error if we try to send a template message that is not a Marketing template message is:

{
    "detail": {
        "error": {
            "message": "(#131055) Method not allowed",
            "type": "OAuthException",
            "code": 131055,
            "error_data": {
                "messaging_product": "whatsapp",
                "details": "Only marketing template messages are supported"
            },
            "fbtrace_id": "AacMONwqoqRZJidqSa1LDey"
        }
    }
}

Not allowed to send messages using MM Lite API

The expected error if we try to send a MM Lite if the phone number is not activated for this Beta initiative:

{
    "detail": {
        "error": {
            "message":"(#200) You must accept the Marketing Messages Lite API terms to use the API."
            "type": "OAuthException",
            "code": 131055,
            "fbtrace_id": "AacMONwqoqRZJidqSa1LDey"
        }
    }
}

Using the wrong D360-API-KEY

If you use an invalid D360-API-KEY, the request will fail with an authentication error. This typically means the token is incorrect or missing.

{ "error": "Invalid api token." }

Examples using multiple programming languages

1. Postman Collection

This collection is designed to help you quickly test and validate MM Lite API behavior across a range of use cases.

How to use:

  1. Import in Postman, the JSON file corresponding to a collection of requests with examples related with MM Lite API.

  2. Modify the collection variables, with the values you received from 360Dialog Team.

2. NodeJS (using request library)

Set current Webhook URL
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://waba-v2.360dialog.io/waba_webhook',
  'headers': {
    'Content-Type': 'application/json',
    'D360-API-KEY': '<token>'
  },
  body: JSON.stringify({
    "url": "https://webhook.site/d4d4df6d-ee02-4572-a021-bcc60836d1e7"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

See details in our documentation.

Send text message using Cloud API
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://waba-v2.360dialog.io/messages',
  'headers': {
    'Content-Type': 'application/json',
    'D360-API-KEY': '<token>'
  },
  body: JSON.stringify({
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "<phone_number>",
    "type": "text",
    "text": {
      "body": "This is a simple text msg send using cloud api"
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

See details in our documentation.

Send Marketing Template message using Cloud API
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://waba-v2.360dialog.io/messages',
  'headers': {
    'Content-Type': 'application/json',
    'D360-API-KEY': '<token>'
  },
  body: JSON.stringify({
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "<phone_number>",
    "type": "template",
    "template": {
      "name": "marketing_text_no_param",
      "language": {
        "policy": "deterministic",
        "code": "en"
      }
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

See details in our documentation.

Send Marketing Template message using MM Lite
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://waba-v2.360dialog.io/marketing_messages',
  'headers': {
    'Content-Type': 'application/json',
    'D360-API-KEY': '<token>'
  },
  body: JSON.stringify({
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "<phone_number>",
    "type": "template",
    "template": {
      "name": "marketing_text_no_param",
      "language": {
        "policy": "deterministic",
        "code": "en"
      }
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

See details in our documentation.

3. Python (using request library)

Set current Webhook URL
import requests
import json

url = "https://waba-v2.360dialog.io/waba_webhook"

payload = json.dumps({
  "url": "https://webhook.site/d4d4df6d-ee02-4572-a021-bcc60836d1e7"
})
headers = {
  'Content-Type': 'application/json',
  'D360-API-KEY': '<token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

See details in our documentation.

Send text message using Cloud API
import requests
import json

url = "https://waba-v2.360dialog.io/messages"

payload = json.dumps({
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<phone_number>",
  "type": "text",
  "text": {
    "body": "This is a simple text msg send using cloud api"
  }
})
headers = {
  'Content-Type': 'application/json',
  'D360-API-KEY': '<token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

See details in our documentation.

Send Marketing Template message using Cloud API
import requests
import json

url = "https://waba-v2.360dialog.io/messages"

payload = json.dumps({
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<phone_number>",
  "type": "template",
  "template": {
    "name": "marketing_text_no_param",
    "language": {
      "policy": "deterministic",
      "code": "en"
    }
  }
})
headers = {
  'Content-Type': 'application/json',
  'D360-API-KEY': '<token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

See details in our documentation.

Send Marketing Template message using MM Lite
import requests
import json

url = "https://waba-v2.360dialog.io/marketing_messages"

payload = json.dumps({
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<phone_number>",
  "type": "template",
  "template": {
    "name": "marketing_text_no_param",
    "language": {
      "policy": "deterministic",
      "code": "en"
    }
  }
})
headers = {
  'Content-Type': 'application/json',
  'D360-API-KEY': '<token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

See details in our documentation.

PreviousSending MessagesNextSolutions for Partners

Last updated 1 month ago

Was this helpful?

Once you’re approved to join the program, you can request a Postman collection that includes both successful request examples and the expected error responses by emailing .

betas@360dialog.com