PHP Classes


Recommend this page to a friend!
  Classes of Marcel Pociot  >  PHP Slack Bot  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Slack Bot
Robot to automate interactions with Slack users
Author: By
Last change: Work on readme
Date: 1 month ago
Size: 1,539 bytes


Class file image Download

BotMan with Nexmo

> To connect BotMan with Nexmo, you first need to create a Nexmo account here and buy a phone number, which is capable of sending SMS.

Go to the Nexmo dashboard at and copy your API key and API secret.


For Laravel, the API key and API secret need to be in your config/services.php file

    'botman' => [
    	'nexmo_key' => 'YOUR-NEXMO-APP-KEY',
        'nexmo_secret' => 'YOUR-NEXMO-APP-SECRET',


If you don't use Laravel, you can pass the Nexmo API key and API secret to the BotManFactory upon initialization.

$botman = BotManFactory::create([
    'nexmo_key' => 'YOUR-NEXMO-APP-KEY',
    'nexmo_secret' => 'YOUR-NEXMO-APP-SECRET',

Register your Webhook

To let Nexmo send your bot notifications when incoming SMS arrive at your numbers, you have to register the URL where BotMan is running at, with Nexmo.

You can do this by visiting your Nexmo dashboard at

There you will find an input field called Callback URL for Inbound Message - place the URL that points to your BotMan logic / controller in this field.

> If you are using Laravel Valet, you can get an external URL for testing using the valet share command.

And that's it - you can now use BotMan with Nexmo to create an interactive SMS bot!