A library to handle Smooch REST API methods conform to current spec
Use composer to manage your dependencies and download Smooch API Client:
composer require frankandoak/smooch-api
$message = new Smooch\Model\Message([
'text' => 'MESSAGE_CONTENT',
'role' => 'appMaker'
]);
$smoochClient = new Smooch\Client();
$smoochClient->setCredentials('SECRET', 'KEY_ID');
$smoochClient
->getAppUser('USER_ID_OR_SMOOCH_ID')
->conversation
->add($message);