Official WhatsApp Business API — A Quick Overview of API & How it Works

Picky Assist
6 min readAug 6, 2018

--

After the massive acquisition of Whatsapp by Facebook in 2014 for $19 billion now its time to show their stakeholders how facebook going to make money using Whatsapp Business Solutions.

Few months back WhatsApp had launched a separate application called WhatsApp business in few countries for helping small and medium companies to manage their business more effectively through WhatsApp. Currently Whatsapp Business have 3 Million Active Business Customers and growing.

After the launch of Whatsapp Business App they have recently started monetize their platform by offering messaging service to medium and large companies through an API who want to connect and engage their customer through WhatsApp, The closed testing has started few months ago with 20 companies and gradually rolling out to new companies.

The Whatsapp Statistics

WhatsApp currently has 1.5 Billion active customers across 170+ Countries
90% of smartphone owners use WhatsApp.

80% of messages sent to WhatsApp are seen within 5 minutes compared to the traditional SMS

A user spends 30 minutes average in a day with Whatsapp.

Getting Started

There are 2 ways to get started with Whatsapp Business API ;

Using a Solution Provider

Solution Providers are partners who have prior approval to activate a telephone number within WhatsApp, but even then one-to-one approval of the solution is still required, which is likely to be done in “6 hands” among Company teams that want WhatsApp, and the Solution Provider.

We act as a Solution Provider to deploy Whatsapp Quickly, keep reading for more details or Visit Our Website www.pickyassist.com

Run your own Infra and solution

In this case, you’ll need to run a WhatsApp Client in an instance of your own, and build your solutions like webhooks and node Web calls yourself. You can find offical developers guide here https://developers.facebook.com/docs/whatsapp/overview

You can directly apply for a developers account here https://www.whatsapp.com/business/api

Now Lets explain in simple for developers how technical it works with your application / server

WhatsApp used a very interesting and completely different solution from other messenger like Messenger or Telegram.

To have a bot in the WhatApp you need to rotate a Node (node) in an instance of your own. This node maintains connectivity to WhatsApp over a long-lived TCP connection.

Your backend is attached to this node and not directly to the WhatsApp servers. Below I will explain a little better this architecture.

Instance / Node

You will need a specific machine to run the WhatsApp client. One thing that caught my attention was the size of the machine they suggest as minimal installation:

If you are using a single server, we recommend a server with at least 250 GB SSD, 16 GB RAM, and 4 core CPU. HDD is not recommended as the I / O speeds will become bottlenecks under load.

On this machine you will run in docker 3 separated processes:

MySQL
CoreApp
WebApp

This daemon / client solution is pretty cool and these nodes could be a step towards developing a decentralised messaging app.

Important information:

You can run a single account per instance. If you need a second test account make sure to use a different number for that second instance.

If you have or need 10 different bots, you will need 10 instances like this.

Client general architecture (node)

CoreApp

CoreApp is the application that does all the magic. It will connect to the WhatsApp servers, it will keep the encryption keys (do not forget that WhatsApp is encrypted end-to-end , the node keeps all these keys in MySQL probably ), it will manage the messages coming and going, backup contacts, etc.

WebApp / APIs

WebApp is the application that interfaces between your backend and CoreApp. Basically it is a web service authenticated by tokens for sending messages out.

Some available client endpoints:

Contacts : Check your customer base numbers
Groups : Creates and manages groups
Health : Check the health / status of your Client (CoreApp and WebApp)
Media : Media management (photos / videos / documents)
Messages : * This one I’ll detail below
Registration : Registering your WhatsApp account
Settings : Application Settings
Stats : Statistics
Support : Direct support endpoint on client
Users : Client tokens / client management

Messages

This is the endpoint of sending messages, probably the main one among all others.

Going straight to the subject, the types of messages that can be sent are:

Audio
Document
Image
Text
HSM — Message Template, where you can dynamically set some type of text from predefined variables.

We can notice that there are no features similar to what we have today in Messenger and even Telegram : buttons, webviews, Carousels, inline keyboard among others, and for that reason, I see something very similar to what is already done via SMS.

May 2020 WhatsApp introduced Interactive Templates with upto 3 buttons but only limited for Template Messaging (HSM)

Webhooks

By the famous Webhooks that your backend will receive the messages sent by your users to the bot. This Webhook is configured directly on the client, nothing is done directly on the WhatsApp servers.

There is not much to write about webhooks, they are simple JSON text, audio or document. In the case of text, they can also be a response to some user interaction bot (the JSON of input comes with a field context )

https://developers.facebook.com/docs/whatsapp/api/webhooks

Cost

Incoming messages to your business number are free of cost and replies within 24 hours from the last user message are also free of cost i.e you will be charged by Whatsapp only if you want to send messages after 24 hours from the last message received from a WhatsApp user or you want to start a conversation with the user.

After the 24 hours window you will be charged based on destination country and your messaging volume, see the discounted volume based pricing. See the Country Wise Pricing

WhatsApp Business API is part of the Facebook Ad and managed through Facebook Business Manager Account https://business.facebook.com

To run your Whatsapp Instance (Nodes) you require to set up a high availability SSD Based dedicated servers for IO free operations which could cost $200 to $300 per month per instance. Read More Here About Pricing

General Informations

Please note WhatsApp Business API doesn't allow you to send Marketing, Promotional Content to your customers after 24 hours of user interaction with your business number.

Your customers should have opted through a 3rd party page like Your Website, Mobile App , Offline Forms clearly mentioning WhatsApp optin as a method. Read More

In order to prevent sending marketing contents after the 24 hours window WhatsApp uses business templates i.e all your message structure should be approved by the WhatsApp compliance team. It can be done through the Facebook Business Manager or an API. Read More

If you are finding it difficult to get approval from WhatsApp official API, you can still get started with WhatsApp Business API using our Robotic Process Automation powered technology which turns your Android Phone as a Server. Read More or Use our pre-approved WhatsApp Official Shared Numbers. Read More

Our Role — How We Can Help You ?

With more than 13 years of experience in Telecommunication field, we work as a Solution Provider to help companies to enroll and comply with WhatsApp Policies and help them to roll out WhatsApp business quickly.

We have complete ready made solution for Whatsapp Business API like Nodes, Core App, High Scalable & Availability Servers , Artificial Intelligence powered Chatbot Builder , Simplified API Similar to SMS

UI Based Solution

  1. Broadcaster
  2. Subscription Management
  3. Smart Replies (AI & ML Powered)
  4. Chatbot Builder
  5. Workflows & Automations
  6. Multi Agent LIVE Chat
  7. Analytics & Reports

If you would like to apply an Whatsapp Business API through us, then please login into https://pickyassist.com and Submit your application

For further discussion on Whatsapp Business API Integration & Development of AI Powered Chatbot or Innovative solutions based on Whatsapp or other messaging platforms please connect me through support@pickyassist.com or Visit https://pickyassist.com

--

--

Picky Assist
Picky Assist

Written by Picky Assist

WhatsApp Integration to 3000+ Apps & Chatbots

Responses (5)