Simple library for sending messages using mProfi API. This library provides classes and methods for sending single or many messages at once.
You can install it using composer:
composer require mprofi/api-client
You can send single message like this
$message = new mprofi\Message('5556667777', 'some message content');
$client = new mprofi\Client('api-token');
$messageIds = $client->send($message);
Sending many messages at one is almost the same as sending single message:
$messages = [
new mprofi\Message('5556667777', 'first message content'),
new mprofi\Message('5556668888', 'second message content'),
];
$client = new mprofi\Client('api-token');
$messageIds = $client->send($messages);
While sending messages you get ids so you can later check status:
$client = new mprofi\Client('api-token');
$client->getStatus();