Install with Composer
composer require jspaetzel/groupme
Then use the autoloader to load this library in your code
require './vendor/autoload.php';
These are some basic examples for how to interact with the api via the library. The APIKEY in these examples is the API key of a user, not a groupme bot key or application key.
$client = new \GroupMePHP\Client('APIKEY');
$message_to_send = "Hello Group!"
$messages_service = new \GroupMePHP\Services\MessagesService($client);
$messages_service->create(12345678, ["THISISAGUID123", $message_to_send]);
$direct_message_service = new \GroupMePHP\Services\DirectMessagesService($client);
$direct_message_service->create([
"source_guid" => "THISISAGUID123",
"recipient_id" => 12345678,
"text" => 'Hello User'
]);
$group_service = new \GroupMePHP\Services\GroupsService($client);
$response = $group_service->index();
$group_service = new \GroupMePHP\Services\GroupsService($client);
$response = $group_service->show(1234567);
$members = $response['members'];
See the contribution guide