Wapi.go SDK Architecture
Wapi.go has a distributed architecture that is designed to incorporate both the Business Management API as wel as the Cloud API porvided by the WhatsApp Business Platform. The architecture is designed to be modular and extensible, allowing developers to easily add new features and functionalities to the SDK. The architecture is divided into the following components:
- Main Top level client with webhook server
- Business Management API client
- Messaging Client (Cloud API client)
Main Top level client with webhook server
The main top level client is the entry point for the SDK. It is responsible for handling incoming messages from the WhatsApp Business Platform and any other event notification to which you have made your application at the developer platform to subscribed to. In order, to start using the SDK you must have to create a instance of this client with the following code:
Buiness Management API client
Now, in order to access the business account specific features such as managing phone numbers, template messages, accessing analytics and updating other entities, you need to access the instance of business client already initiated in the main client. The business client is responsible for handling all the business management API requests. You can access the business client instance by calling the following code:
Messaging Client (Cloud API client)
To access the messaging client you need to create a instance of the messaging client by calling the following code: