sdksio / whatsapp-cloud-api-sdk
Use cloud-hosted version of the WhatsApp Business API to send and receive messages
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- apimatic/core: ~0.3.0
- apimatic/core-interfaces: ~0.1.0
- apimatic/unirest-php: ^4.0.0
Requires (Dev)
- phan/phan: 5.4.2
- squizlabs/php_codesniffer: ^3.5
README
Introduction
Welcome to the WhatsApp API from Meta.
Individual developers and existing Business Service Providers (BSPs) can now send and receive messages via the WhatsApp API using a cloud-hosted version of the WhatsApp Business API. Compared to the previous solutions, the cloud-based WhatsApp API is simpler to use and is a more cost-effective way for businesses to use WhatsApp. Please keep in mind the following configurations:
Install the Package
Run the following command to install the package and automatically add the dependency to your composer.json file:
composer require "sdksio/whatsapp-cloud-api-sdk:1.0.0"
Or add it to the composer.json file manually as given below:
"require": { "sdksio/whatsapp-cloud-api-sdk": "1.0.0" }
You can also view the package at: https://packagist.org/packages/sdksio/whatsapp-cloud-api-sdk#1.0.0
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
The API client can be initialized as follows:
$client = WhatsAppCloudAPIClientBuilder::init() ->accessToken('AccessToken') ->environment('production') ->version('v13.0') ->build();
Authorization
This API uses OAuth 2 Bearer token
.