InstiKit supports Nexmo (www.nexmo.com), Twilio (www.twilio.com) & a custom SMS gateway for sending SMS. Its very easy to confiure SMS gateway to send customized & bulk SMS at once. Sending SMS is time taking process, therefore InstiKit pushes the SMS in Queue which is initiated by a cron job.
Make sure, QUEUE_DRIVER variable in your .env file is "database".
Go to Configuration -> SMS Configuration to begin SMS Gateway setup:
Max SMS is single queue is the maximum chunk from your bulk SMS submission that will be processed at once.
Choose Nexmo driver if you have valid Nexmo Account with SMS balance:
Field | Type | Is Required | description |
Nexmo API Key | String | Yes | API Key from your account, visit Nexmo, login to your account & get API Key |
Nexmo API Secret | String | Yes | API Secret from your account, visit Nexmo, login to your account & get API Secret |
Sender Mobile Number | Number | Yes | Sender Id from which Nexmo sends account, must be approved prior to use by Nexmo |
Mobile Number for Testing | Number | Yes | Any mobile number for sending a test message |
If you are able to store the Nexmo configuration, it means you will be able to send SMS.
Choose Twilio driver if you have valid Twilio Account with SMS balance:
Field | Type | Is Required | description |
Twilio SID | String | Yes | SID from your account, visit Twilio, login to your account & get SID |
Twilio Token | String | Yes | Token from your account, visit Twilio, login to your account & get Token |
Sender Mobile Number | Number | Yes | Sender Id from which Token sends account, must be approved prior to use by Token |
Mobile Number for Testing | Number | Yes | Any mobile number for sending a test message |
If you are able to store the Twilio configuration, it means you will be able to send SMS.
Choose Custom SMS gateway driver if you have any SMS gateway that supports HTTP GET based API with SMS balance:
Let's say your SMS API is http://yoursmsgateway.com/api/send.php?username=your_username&password=your_password&to=mobile_number&senderId=sender_id&message=message
Field | Type | Is Required | description |
API Get URL | URL | Yes | This is your SMS sending URL for exmaple, http://yoursmsgateway.com/api/send.php?username=your_username&password=your_password&anyOtherVariable=any_other_variable It can also be like http://yoursmsgateway.com/api/send.aspx?authKey=your_auth_token&anyOtherVariable=any_other_variable |
API Number Prefix | Number | Optional | The number which you want to prefix before each number, like Country Code. Do not enter "+" or "0" |
API Sender Id Parameter | String | Yes | The parameter name of Sender Id in SMS Api. For above example, you parameter for Sender Id is "senderId" |
API Sender Id/Number | String/Number | Yes | Your Sender Id for sending SMS |
API Receiver Parameter | String | Yes | The parameter name of receiver in SMS Api, For above example, you parameter for Receiver is "to" |
API Message Parameter | String | Yes | The parameter name of message in SMS Api, For above example, you parameter for Receiver is "message" |
API accepts Multiple Receiver | Boolean | Optional | If you can send multiple SMS at once by defining numbers in comma separated like "to=12542,15485,25486" then check this optional else leave this field |
Don't forget to schedule a Cron Job by putting following command in cron tab.
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
If you have cPanel installed on your server, here is the screenshot of the command you can schedule:
/usr/local/bin/php /home/username/public_html/domain/artisan schedule:run >> /dev/null 2>&1
There are times when you need to specify the php version as below:
/usr/local/bin/ea-php73 /home/username/public_html/domain/artisan schedule:run >> /dev/null 2>&1
If you are hosting this script in local server, you need Task Scheduler (in Windows) or Cron (in Linux). Here is good tutorial about Task Scheduler in Windows Platform.
If you have any query regarding this configuration, please raise a ticket at our support portal.