Code Monkey home page Code Monkey logo

insightifysms-api-sdk's Introduction

Insightify SMS PHP SDK

The Insightify SMS PHP SDK provides a suitable approach to the Insightify SMS API from applications written in PHP. It includes pre-defined set of classes and functions for API resource that initialize themselves from API responses.

The library provides other features. For Example:

  1. Easy configuration path for fast setup and use
  2. Helpers for pagination.

You can sign up for an Insightify SMS account at insightifysms.com

Prerequisites

PHP ^8.0 and later

Installation

Via Composer

$ composer require insightifysms/insightifysms-api-sdk

Via Git Bash

git clone https://github.com/majesty2017/insightifysms-api-sdk.git

Documentation

Please see https://insightifysms.com/developer for up-to-date documentation

Usage

Step 1:

If you install the insightify SMS PHP SDK via Git Clone then load the insightify SMS PHP API class file and use namespace.

require_once '/path/to/src/InsightifySMS.php';
use Insightify\InsightifySMS;

If you install insightify SMS PHP SDK via Composer require the autoload.php file in the index.php of your project or whatever file you need to use insightify SMS PHP API classes.

require __DIR__ . '/vendor/autoload.php';
use Insightify\InsightifySMS;

The insightify SMS PHP SDK endpoints are RESTful, and consume and return JSON. All Http endpoints requires an API Key in the request header.

For more information on how to get an API Key visit here to copy or generate new key for authorization.

HTTP ENDPOINTS

Step 2:

Instantiate the InsightifySMSSDKAPI

$client = new Insightify\InsightifySMS();

Send SMS

$api_key = "Enter Your API Key here";

$url = "https://app.insightifysms.com/api/v3/sms/send";

$recipients = "233500000000,233540000000";
$message = "Hello world";
$senderid = "Enter your approved sender ID here";

$response = $client->send_sms($url, $api_key, $senderid, $recipients, $message);

Check SMS Credit Balance

$api_key = "Enter Your API Key here";

$url = "https://app.insightifysms.com/api/v3/balance";

$get_credit_balance = $client->check_balance($url, $api_key);

View Profile

$api_key = "Enter Your API Key here";

$url = "https://app.insightifysms.com/api/v3/me";

$get_profile = $client->profile($url, $api_key);

Status Code

Status Message
ok Successfully Send
100 Bad gateway requested
101 Wrong action
102 Authentication failed
103 Invalid phone number
104 Phone coverage not active
105 Insufficient balance
106 Invalid Sender ID
107 Invalid SMS Type
108 SMS Gateway not active
109 Invalid Schedule Time
110 Media url required
111 SMS contain spam word. Wait for approval

insightifysms-api-sdk's People

Contributors

majesty-scofield avatar

Watchers

Reborn Dzre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.