1. Go to this page and download the library: Download gradiwapp/gradiwapp-php-sdk 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/ */
gradiwapp / gradiwapp-php-sdk example snippets
use GradiWapp\Sdk\Client;
use GradiWapp\Sdk\Config;
$config = new Config(
apiKey: 'your_key',
apiSecret: 'your_secret'
);
$client = new Client($config);
$response = $client->messages()->sendText(
to: '+123456',
body: 'Hello from GradiWapp!'
);
public function send(GradiWapp\Sdk\Client $client)
{
return $client->messages()->sendText(
to: '+123456',
body: 'Hello!'
);
}
use GradiWapp\Sdk\Laravel\Facades\GradiWapp;
GradiWapp::messages()->sendText('+123456', 'Hello!');
$client->messages()->sendText('+123', 'Hello!');
$client->messages()->sendImage(
'+123',
'https://example.com/image.jpg',
caption: 'Check this out!'
);