File "group-create.php"

Full Path: /home/trinadezambia/public_html/gambling/vendor/messagebird/php-rest-api/examples/group-create.php
File size: 520 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

require_once(__DIR__ . '/../autoload.php');

$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY'); // Set your own API access key here.

$group             = new \MessageBird\Objects\Group();
$group->name       = "group_name";

try {
    $groupResult = $messageBird->groups->create($group);
    var_dump($groupResult);
} catch (\MessageBird\Exceptions\AuthenticateException $e) {
    // That means that your accessKey is unknown
    echo 'Wrong login';
} catch (\Exception $e) {
    echo $e->getMessage();
}