PHP code example of opendaje / ultramsg-client

1. Go to this page and download the library: Download opendaje/ultramsg-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

opendaje / ultramsg-client example snippets


...

$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();