Download the PHP package checkmobi/checkmobi-php without Composer
On this page you can find all versions of the php package checkmobi/checkmobi-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download checkmobi/checkmobi-php
More information about checkmobi/checkmobi-php
Files in checkmobi/checkmobi-php
Package checkmobi-php
Short Description CheckMobi SDK for PHP
License MIT
Homepage https://github.com/checkmobi/checkmobi-php
Informations about the package checkmobi-php
checkmobi-php
The official SDK for integrating with the CheckMobi API. CheckMobi is a service that provides affordable services like:
- Two-factor authentication via SMS, Missed Call, and IVR
- SMS API for marketing and transactional notifications.
- Voice API for creating custom IVRs.
This PHP SDK makes it easy for developers to add CheckMobi's features like SMS and Voice to their PHP apps without much hassle.
Requirements
In order to use the library you need to have available one of CURL
or HTTP_Request2
extension:
Using CURL
Using HTTP_Request2
:
The SDK initially checks for the CURL
extension and then falls back to HTTP_Request2
if necessary. You can set the transport method using the constructor's options
parameter.
Installation
The SDK can be installed using Composer
:
Get started
Create the CheckMobiRest client
In case you want to change the default behaviours of the library you can use the options
array properties:
Property | Default | Description |
---|---|---|
api.base_url | https://api.checkmobi.com | API endpoint. |
api.version | v1 | API endpoint version. |
net.transport | RequestInterface::HANDLER_DEFAULT |
Transport engine: RequestInterface::HANDLER_DEFAULT - will try to use CURL if available otherwise fallbacks to HTTP_Request2 , RequestInterface::HANDLER_CURL will force to use CURL, if fails will trigger an exception, RequestInterface::HANDLER_HTTP2 will force HTTP_Request2 instantiation, if fails will trigger an exception. |
net.timeout | 30 | Connection and request timeout in seconds. |
net.ssl_verify_peer | true | Indicates if the server certificate is verified or not before transmitting any data. |
Example
Resources
The SDK is a wrapper over the REST API described here. For all properties accepted by the following methods check the documentation.
Response handling
The response it's an object of the CheckMobiResponse
type which exposes the following methods:
Method | Description |
---|---|
is_success | boolean - returns if the response represents an error or not. |
status_code | integer - the HTTP status code received. |
payload | array or NULL - The json decoded response payload as received from the server. |
Example
All versions of checkmobi-php with dependencies
ext-json Version *