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

โ€‹

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 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.

โ€‹https://developers.facebook.com/docs/whatsapp/api/messagesโ€‹

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 is free of cost and replies within 24 hours from the last user message is 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.

After the 24 hours window you will be charged based on destination country and your messaging volume, see the discounted volume based pricing https://developers.facebook.com/docs/whatsapp/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 setup a high availability SSD Based dedicated servers for IO free operations which could cost $200 to $300 per month per instance.

General Informations

Please note WhatsApp Business API dont allow you to send Marketing, Promotional Contents to your customers after 24 hours of a user interaction with your business number.

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

In order to prevent sending marketing contents after the 24 hours window WhatsApp use business templates i.e all your message stricture should be approved by WhatsApp Ad compliance team. It can be done through the Facebook Business Manager.

If you are finding 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 https://pickyassist.com/whatsapp-business-apiโ€‹

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 enrol 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

Broadcaster Subscription Management Smart Replies (AI & ML Powered) Chatbot Builder Workflows & Automations Multi Agent LIVE Chat Analytics & Reports

If you would like to apply an Whatsapp Business API through us, then please provide the following details to support@pickyassist.com

Your Company Name Type of Company Business Segment (Industry) Brief about your business Use Case for sending messages How many employees working Average Number of Messages in a Day Few Sample messages you would like to send

Please note we dont have any control over WhatsApp 6 step screening process, based on our experience of onboarding many companies with whatsapp and facebook we can help you to ease the process and GO LIVE with less time.

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โ€‹