opendaje / ultramsg-client
Ultramsg WhatsApp API based on PSR standard.
Fund package maintenance!
pMononoke
Requires
- php: ^8.0
- php-http/client-common: ^2.3
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- symfony/http-client: ^6.0
- symfony/options-resolver: ^4.4 || ^5.4 || ^6
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- laminas/laminas-diactoros: ^3.2
- php-http/curl-client: ^2.3
- php-http/mock-client: ^1.6
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-04 18:59:21 UTC
README
Easy whatsApp integration in your applications
⚠ Launching early stage releases (0.x.x) could break the API according to Semantic Versioning 2.0. We are using minor for breaking changes.
This will change with the release of the stable 1.0.0
version.
Requirements
- PHP >= 8.0
- A PSR-18 implementation
About UltraMsg
Quick install
Via Composer.
This package is not tied to any specific library that sends HTTP messages. Instead, it uses Httplug to let users choose whichever PSR-7 implementation and HTTP client they want to use.
If you just want to get started quickly you should run the following command:
composer require opendaje/ultramsg-client symfony/http-client nyholm/psr7
This will install the library itself along with a symfony HTTP client adapter. You do not have to use those packages if you do not want to. The package does not care about which transport method you want to use because it's an implementation detail of your application. You may use any package that provides http-message-implementation.
Other available HTTP Clients
Example
... $options = new Options([ 'token' => 'MY_TOKEN', 'instanceId' => 'MY_INSTANCE_ID', ]); $client = new UltraMsgClient($options); // see src/Api/Messages methods $client->api('messages')->sendChatMessage('555-555-555', 'Hello!!!'); // see src/Api/Groups methods $client->api('groups')->getGroups();