PHPackages                             citcall/api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. citcall/api

ActiveLibrary[API Development](/categories/api)

citcall/api
===========

Citcall API Request

3.4.3(2y ago)07.0k1[1 PRs](https://github.com/citcall-com/api-php/pulls)MITPHPPHP &gt;=5.5.0

Since Feb 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/citcall-com/api-php)[ Packagist](https://packagist.org/packages/citcall/api)[ RSS](/packages/citcall-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)DependenciesVersions (9)Used By (0)

Citcall Library for PHP
=======================

[](#citcall-library-for-php)

This is the PHP client library for use Citcall's API. To use this, you'll need a Citcall account and Your IP has been filtered in citcall system. See [citcall documentation](https://docs.citcall.com) for more information. This is currently a beta release.

Installation
------------

[](#installation)

### Install with Composer

[](#install-with-composer)

To install the PHP client library to your project, we recommend using [Composer](https://getcomposer.org/).

```
composer require citcall/api
```

> You don't need to clone this repository to use this library in your own projects. Use Composer to install it from Packagist.

If you're new to Composer, here are some resources that you may find useful:

- [Composer's Getting Started page](https://getcomposer.org/doc/00-intro.md) from Composer project's documentation.
- [A Beginner's Guide to Composer](https://scotch.io/tutorials/a-beginners-guide-to-composer) from the good people at ScotchBox.

### Install source from GitHub

[](#install-source-from-github)

To install the source code:

```
$ git clone git://github.com/citcall/sample-php.git

```

And include it in your scripts:

```
require_once '/path/to/src/Citcall.php';

```

Usage
-----

[](#usage)

If you're using Composer, make sure the autoloader is included in your project's bootstrap file:

```
require_once "vendor/autoload.php";
```

Create a citcall with your API key:

```
$citcall = new Citcall\Citcall(APIKEY);
```

Examples
--------

[](#examples)

### Miscall OTP

[](#miscall-otp)

To use [Citcall's Miscall Async API](https://docs.citcall.com/async/) to Asynchronous miscall, call the `$citcall->miscall()` method.

The API can be called directly, using a simple array of parameters, the keys match the [parameters of the API](https://docs.citcall.com/async/).

```
$motp = $citcall->motp([
	'msisdn' => MSISDN,
	'gateway' => GATEWAY
]);
```

If you want to able to do verify later use this example.

```
$motp = $citcall->motp([
	'msisdn' => MSISDN,
	'gateway' => GATEWAY,
	'valid_time' => TIME_VALID, //optional - valid time in seconds
	'limit_try' => LIMIT_TRY //optional - maximum attempt
	'callback_url' => CALLBACK_URL //Webhook URL where delivery status for the result will be posted (Overwrites your default account callback URL).
]);
```

The API response data can be accessed as array properties of the async\_miscall.

```
print_r($motp);
```

### Callback Miscall OTP

[](#callback-miscall-otp)

You can configure your default callback URL for your account at our [Dashboard](https://dashboard.citcall.com) on API menu. You can also overwrite the default callback URL on by specifying a different **callback\_url** value in your API requests.

See this [Example](https://github.com/citcall/sample-php/blob/master/examples/callback_miscall.php) to use callback.

### SMS

[](#sms)

To use [Citcall's SMS API](https://docs.citcall.com/#sms) to send an SMS message, call the `$citcall->sms()` method.

The API can be called directly, using a simple array of parameters, the keys match the [parameters of the API](https://docs.citcall.com/#sms).

```
$sms = $citcall->sms([
	'senderid' => 'citcall',
	'msisdn' => MSISDN,
	'text' => 'Test message from the Citcall PHP',
	'callback_url' => CALLBACK_URL //Webhook URL where delivery status for the result will be posted (Overwrites your default account callback URL).
]);
```

The API response data can be accessed as array properties of the sms.

```
print_r($sms);
```

### Callback SMS

[](#callback-sms)

You can configure your default callback URL for your account at our [Dashboard](https://dashboard.citcall.com) on API menu. You can also overwrite the default callback URL on by specifying a different **callback\_url** value in your API requests.

See this [Example](https://github.com/citcall/sample-php/blob/master/examples/callback_sms.php) to use callback.

### SMSOTP

[](#smsotp)

To use [Citcall's SMSOTP API](https://docs.citcall.com/#sms-otp) to send an SMS message with OTP text, call the `$citcall->smsotp()` method.

The API can be called directly, using a simple array of parameters, the keys match the [parameters of the API](https://docs.citcall.com/#sms-otp).

```
$smsotp = $citcall->smsotp([
	'senderid' => 'citcall',
	'msisdn' => MSISDN,
	'text' => 'Test message OTP from the Citcall PHP',
	'callback_url' => CALLBACK_URL //Webhook URL where delivery status for the result will be posted (Overwrites your default account callback URL).
]);
```

The API response data can be accessed as array properties of the sms.

```
print_r($smsotp);
```

### Callback SMSOTP

[](#callback-smsotp)

You can configure your default callback URL for your account at our [Dashboard](https://dashboard.citcall.com) on API menu. You can also overwrite the default callback URL on by specifying a different **callback\_url** value in your API requests.

See this [Example](https://github.com/citcall/sample-php/blob/master/examples/callback_smsotp.php) to use callback.

### Verify OTP Code

[](#verify-otp-code)

To use [Citcall's Verify API](https://docs.citcall.com/#verify) to verify OTP, call the `$citcall->verify()` method.

The API can be called directly, using a simple array of parameters, the keys match the [parameters of the API](https://docs.citcall.com/#verify).

```
$verify = $citcall->verify([
	'msisdn' => MSISDN,
	'trxid' => TRXID,
	'token' => TOKEN
]);
```

The API response data can be accessed as array properties of the verify\_motp.

```
print_r($verify);
```

Contribute
----------

[](#contribute)

1. Check for open issues or open a new issue for a feature request or a bug
2. Fork [the repository](https://github.com/citcall/sample-php) on Github to start making your changes to the `master` branch (or branch off of it)
3. Write a test which shows that the bug was fixed or that the feature works as expected
4. Send a pull request and bug us until We merge it

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~200 days

Recently: every ~350 days

Total

8

Last Release

927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb310ac8b0ceb076c2f5194660c1dd2226c34fcf7a4778e32e8b226b4fad6717?d=identicon)[citcall](/maintainers/citcall)

![](https://avatars.githubusercontent.com/u/17130223?v=4)[Muhammad Chairul](/maintainers/mchairul)[@mchairul](https://github.com/mchairul)

---

Top Contributors

[![mchairul](https://avatars.githubusercontent.com/u/17130223?v=4)](https://github.com/mchairul "mchairul (12 commits)")[![iyungalegre](https://avatars.githubusercontent.com/u/25838141?v=4)](https://github.com/iyungalegre "iyungalegre (10 commits)")[![citcall-dev](https://avatars.githubusercontent.com/u/31437298?v=4)](https://github.com/citcall-dev "citcall-dev (7 commits)")

### Embed Badge

![Health badge](/badges/citcall-api/health.svg)

```
[![Health](https://phpackages.com/badges/citcall-api/health.svg)](https://phpackages.com/packages/citcall-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
