Download the PHP package netflie/whatsapp-cloud-api without Composer
On this page you can find all versions of the php package netflie/whatsapp-cloud-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netflie/whatsapp-cloud-api
More information about netflie/whatsapp-cloud-api
Files in netflie/whatsapp-cloud-api
Package whatsapp-cloud-api
Short Description The first PHP SDK to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform
License MIT
Informations about the package whatsapp-cloud-api
What It Does
This package makes it easy for developers to access WhatsApp Cloud API service in their PHP code.
The first 1,000 conversations each month are free from WhatsApp Cloud API. A conversation.
Getting Started
Please create and configure your Facebook WhatsApp application following the "Get Stared" section of the official guide.
Minimum requirements – To run the SDK, your system will require PHP >= 7.4 with a recent version of CURL >=7.19.4 compiled with OpenSSL and zlib.
Installation
Quick Examples
Send a text message
Send a document
You can send documents in two ways: by uploading a file to the WhatsApp Cloud servers (where you will receive an identifier) or from a link to a document published on internet.
Send a template message
You also can build templates with parameters:
Send an audio message
Send an image message
Send a video message
Send a sticker message
Stickers sample: https://github.com/WhatsApp/stickers
Send a location message
Send a location request message
Send a contact message
Send a list message
Send a CTA URL message
Send Catalog Message
Send a button reply message
Send Multi Product Message
Send Single Product Message
Replying messages
You can reply a previous sent message:
React to a Message
You can react to a message from your conversations if you know the messageid
Media messages
Upload media resources
Media messages accept as identifiers an Internet URL pointing to a public resource (image, video, audio, etc.). When you try to send a media message from a URL you must instantiate the LinkID
object.
You can also upload your media resources to WhatsApp servers and you will receive a resource identifier:
Download media resources
To download a media resource:
Message Response
WhatsAppCloudApi instance returns a Response class or a ResponseException if WhatsApp servers return an error.
Webhooks
Webhook verification
Add your webhook in your Meta App dashboard. You need to verify your webhook:
Webhook notifications
Webhook is now verified, you will start receiving notifications every time your customers send messages.
The Webhook::read
function will return a Notification
instance. Please, explore the different notifications availables.
Mark a message as read
When you receive an incoming message from Webhooks, you can mark the message as read by changing its status to read. Messages marked as read display two blue check marks alongside their timestamp.
Marking a message as read will also mark earlier messages in the conversation as read.
Get Business Profile
Update Business Profile
Fields list: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/business-profiles
Features
- Send Text Messages
- Send Documents
- Send Templates with parameters
- Send Audios
- Send Images
- Send Videos
- Send Stickers
- Send Locations
- Send Location Request
- Send Contacts
- Send Lists
- Send Buttons
- Send Multi Product Message
- Send Single Product
- Upload media resources to WhatsApp servers
- Download media resources from WhatsApp servers
- Mark messages as read
- React to a Message
- Get/Update Business Profile
- Webhook verification
- Webhook notifications
Getting Help
- Ask a question on the Discussions forum
- To report bugs, please open an issue
Migration to v2
Please see UPGRADE for more information on how to upgrade to v2.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
You also can run tests making real calls to the WhastApp Clou API. Please put your testing credentials on WhatsAppCloudApiTestConfiguration file.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information. Please see License file for more information.
Disclaimer
This package is not officially maintained by Facebook. WhatsApp and Facebook trademarks and logos are the property of Meta Platforms, Inc.
All versions of whatsapp-cloud-api with dependencies
guzzlehttp/guzzle Version ^7.0
vlucas/phpdotenv Version ^5.4
myclabs/php-enum Version ^1.8