Download the PHP package smsfire/php-sdk without Composer
On this page you can find all versions of the php package smsfire/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-sdk
SMSFIRE PHP SDK
Requirements
- Composer > 2+
- PHP >= 7.1.0
- User and pass (Register here)
Installation
You can install php-sdk via composer or by downloading the source.
Composer
php-sdk is available on Packagist as the smsfire/php-sdk package:
SMS Services
The reference of this service can be found here
:speech_balloon: Messages Service
:mailbox_with_mail: Inbox Service
:ballot_box_with_check: Status Service
Namespace - Smsfire\Sms\Messages
This namespace allows you to send SMS messages.
- sendIndividual() - Send individual sms message
- sendBulk() - Send bulk sms messages
Receiving messages (MO)
When you set as true the
allowReply
param on sendBulk() messaging methods, your account may have additional costs per each received message. Contact your account manager to know more about it.Flash messages - Class 0
The
flash
param depends of route that were settled on your account as well of each carrier's availability for this feature. Contact your account manager to know more about it.
Send individual message - sendIndividual()
Access the reference docs to check the data response and the details of each parameter of this method.
Guide of available parameters on this method
Param | Type | Description | Condition | Required |
---|---|---|---|---|
to | string | Phone at international syntax | Max of 15 characters | :white_check_mark: |
text | string | SMS message | Max of 765 characters | :white_check_mark: |
from | string | Remitent of sms | Max of 11 characters | :x: |
customId | string | Set your own id | Max of 40 characters | :x: |
campaignId | int | Merge messages into existent campaign | - | :x: |
flash | bool | Send message on flash mode - Check availability | Default: false | :x: |
allowReply | bool | Allow gateway to capture reply from your messages | Default: false | :x: |
scheduleTime | string | Schedule message on given datetime | Datetime ISO8601 | :x: |
debug | bool | Debug API request | Default: false | :x: |
Example
Send bulk messages - sendBulk()
Access the reference docs to check the data response and the details of each parameter of this method.
Guide of available parameters on this method
Param | Type | Description | Condition | Required |
---|---|---|---|---|
destinations | array | Array of destinations to message | Min of 2 items and Max of 1000 items | :white_check_mark: |
*destinations[].to** | string | Phone at international syntax | Max of 15 characters | :white_check_mark: |
*destinations[].text** | string | SMS message | Max of 765 characters | :white_check_mark: |
*destinations[].from** | string | Remitent of SMS | Max of 11 characters | :x: |
*destinations[].customId** | string | Set your own id | Max of 40 characters | :x: |
*destinations[].flash** | bool | Send message on flash mode - Check availability | Default: false | :x: |
allowReply | bool | Allow gateway to capture reply from your messages | Default: false | :x: |
scheduleTime | string | Schedule message on given datetime | Datetime ISO8601 | :x: |
debug | bool | Debug API request | Default: false | :x: |
Example
Namespace - Smsfire\Sms\Inbox
This namespace allows you to get received messages from your sms inbox.
- getAll() - Get read and unread messages
- getUnread() - Get unread messages
Access the reference docs to check the data response and the details of each parameter of this method.
The statusCode 204 will be given when your inbox has no messages. REF. 204 No Content
Get all messages - getAll()
Example
Due API limitations this method will expose the last 100 received messages of your inbox. For more, access the Portal SMSFire and access it on menu SMS > Inbox
Get unread messages - getUnread()
Example
Namespace - Smsfire\Sms\Status
This namespace allows you to get messages status by id
or given customId
- messageIds() - Get messages status by id
- customIds() - Get messages status by customId
Access the reference docs to check the data response and the details of each parameter of this method.
The statusCode 204 will be given when given id or customId does not exist. REF. 204 No Content
Get messages status by id - messageIds()
Guide of available parameters on this method
Param | Type | Description | Condition | Required |
---|---|---|---|---|
ids | string | String with messages ids (Comma separated) | Min of 1 and max of 200 Ids | :white_check_mark: |
debug | bool | Debug API request | Default: false | :x: |
Example
Due API limitations this method will accepts the maximum of 200 messages ids. For more, access the Portal SMSFire and access it on menu SMS > Reports
Get messages status by customId - customIds()
Guide of available parameters on this method
Param | Type | Description | Condition | Required |
---|---|---|---|---|
customIds | string | String with custom id of messages (Comma separated) | Min of 1 and max of 200 custom ids | :white_check_mark: |
debug | bool | Debug API request | Default: false | :x: |
Example
Namespace - Smsfire\Exceptions
Custom exceptions that allows you a better error handling.
SmsfireException
This will be thrown when any SDK required types and data were not meet.
HttpException
This will be thrown when the core API has some request problem as timeout or bad data for example.