PHPackages                             tingting/laravel - 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. tingting/laravel

ActiveLibrary[API Development](/categories/api)

tingting/laravel
================

A Laravel package for TingTing API integration.

v1.0.3(3mo ago)016↓50%1MITPHPPHP ^7.2

Since Jan 28Pushed 3mo agoCompare

[ Source](https://github.com/ramonov/tingtingapi)[ Packagist](https://packagist.org/packages/tingting/laravel)[ RSS](/packages/tingting-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

TingTing Laravel API Package
============================

[](#tingting-laravel-api-package)

A robust Laravel package for integrating with the [TingTing AI-powered telephony system](https://tingting.io). Send programmed voice calls and SMS in Nepali with ease.

Features
--------

[](#features)

- **Authentication**: JWT Login, Refresh, Static API Token support, and User Details.
- **Phone Numbers**: List active broker and account-assigned phone numbers.
- **Campaign Management**: Full CRUD for campaigns, run campaigns, and add specific voice assistance.
- **Contact Management**: Add individual or bulk contacts, manage custom attributes, and update information.
- **Error Handling**: Custom exception handling for API errors.
- **OTP Services**: Send OTPs via voice/text and retrieve logs of sent OTPs.

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

[](#installation)

Add from composer

```
composer require tingting/laravel
```

OR

Add manually the repository to your `composer.json`:

```
"repositories": [
    {
        "type": "path",
        "url": "../TingTingAPI"
    }
],
"require": {
    "tingting/laravel": "*"
}
```

Then run:

```
composer update tingting/laravel
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="tingting-config"
```

Configure your credentials in `.env`:

```
TINGTING_BASE_URL=https://app.tingting.io/api/v1/
TINGTING_API_TOKEN=your_static_api_token
TINGTING_EMAIL=your_email
TINGTING_PASSWORD=your_password
```

Available Methods
-----------------

[](#available-methods)

The package provides a `TingTing` facade with the following capabilities:

### Authentication

[](#authentication)

- `login(string $email, string $password)`
- `refreshToken(string $refresh)`
- `generateApiKeys()` (Generate static token)
- `getApiKeys()` (Retrieve static token)
- `userDetail()`
- `setToken(string $token)` (Manual token override)
- `setApiToken(string $token)` (Alias for setToken)

### Phone Numbers

[](#phone-numbers)

- `activeBrokerPhones()`
- `activeUserPhones()`

### Campaigns

[](#campaigns)

- `listCampaigns(array $filters = [])`
- `createCampaign(array $data)`
- `updateCampaign(int $campaignId, array $data)`
- `deleteCampaign(int $campaignId)`
- `runCampaign(int $campaignId)`
- `addVoiceAssistance(int $campaignId, array $data)`
- `downloadReport(int $campaignId)`

### Contact Management

[](#contact-management)

- `addContact(int $campaignId, array $data)`
- `addBulkContacts(int $campaignId, mixed $bulkData)`
- `listContacts(int $campaignId, array $filters = [])`
- `deleteContact(int $contactId)`
- `getContactAttributes(int $contactId)`
- `editContactAttributes(int $contactId, array $attributes)`
- `updateContactNumber(int $contactId, string $number)`

### OTP Services

[](#otp-services)

- `sendOtp(array $data)`
- `listSentOtps(array $filters = [])`

Error Handling
--------------

[](#error-handling)

The package throws `TingTing\Laravel\Exceptions\TingTingApiException` when an API request fails. You can catch this exception to handle errors gracefully:

```
use TingTing\Laravel\Exceptions\TingTingApiException;
use TingTing\Laravel\Facades\TingTing;

try {
    $response = TingTing::userDetail();
} catch (TingTingApiException $e) {
    echo "Error: " . $e->getMessage();
    $data = $e->getData(); // Get raw error data from the API
}
```

Basic Usage
-----------

[](#basic-usage)

```
use TingTing\Laravel\Facades\TingTing;

// User Detail Example
$user = TingTing::userDetail();

// Send OTP Example
$response = TingTing::sendOtp([
    'number' => '9800000000',
    'message' => 'तपाईको रिसेटिंग कोड १२३४ हो',
    'sms_send_options' => 'voice',
    'otp_length' => 4,
    'otp_options' => 'generated',
]);

//list campaigns with filters limit|offset|status
$campaigns = TingTing::listCampaigns([
            'limit' => 5,
            'offset' => 0,
            'status' => 'Not Started',
        ]);
```

API reference document from TingTing
------------------------------------

[](#api-reference-document-from-tingting)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

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 ~4 days

Total

4

Last Release

95d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.2PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cc3081c4c0ca6a363217854122b585c85d8453994197ce92ec0f1a1a7121894?d=identicon)[ramonov](/maintainers/ramonov)

---

Top Contributors

[![ramonov](https://avatars.githubusercontent.com/u/2510211?v=4)](https://github.com/ramonov "ramonov (16 commits)")[![cmonsuman](https://avatars.githubusercontent.com/u/259796494?v=4)](https://github.com/cmonsuman "cmonsuman (1 commits)")

### Embed Badge

![Health badge](/badges/tingting-laravel/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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