Seamlessly integrate our HTTP WhatsApp Messaging API

Introduction

This document provides a reference for all features available to you via the HTTP interface for sending messages.

The HTTP-API allows you to integrate your application (client) to us (provider) using the HTTP protocol to send messages. HTTPS is also supported for secure transactions using SSL encryption.

To use It, you will need an account and an API key. Mob Army will generate these for you.

The Client issues a HTTP POST request to the HTTP interface supplying a list of required parameters. The HTTP-API issues back an HTTP response which indicates the validity of the transaction.

The HTTP-API is used for one-way messaging only. Therefore, you need to provide a valid MSISDN as the destination number.


HTTP API Features

  • Dedicated Custom Sender Number (consult provider for the service)
  • 24/7 support via our support team

Sending a WhatsApp Message

API URL: https://api.mobarmy.dev/send-whatsapp

HTTP Parameters

Below is a list of parameters when issuing a HTTP request.

ParameterDescriptionPresence
msisdnMSIDSN of the recipient that the message will be sent to. Eg: 59172083143 (Do not use + before the country code)Mandatory
messageMessage to be sent. Must be URL encoded.Mandatory
api-keyThe API Key Mob Army generates for you. It could be send in the header or in the URL query as a parameter.Mandatory

HTTP Response

The HTTP response contains the following:

  • Sent Message ID
  • Status Response
  • Sent Status

Status Codes

If the message has been sent successfully the status code will return:

Example:

 {
    "id": "true_59170749005@c.us_3EB0089192FFBC3ADCC1",
    "response": "Sent to 59170749005@c.us",
    "sent": true
 }

If the message was unable to be delivered it will return an ERROR message in the response field.

Examples

Below are example requests when using the HTTP interface.

Example Request

api-key: ooq5tOIxcGdMlsLHpJLL3UMUdlbmQWxs

msisdn : 59172083143

message : Hello World

Request:
https://api.mobarmy.dev/send-whatsapp?api-key=ooq5tOIxcGdMlsLHpJLL3UMUdlbmQWxs&msisdn=59172083143&message=Hello%20world