dutchie027 / teli
Wrapper for Teli API
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
pkg:composer/dutchie027/teli
Requires
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- monolog/monolog: ^2.2
This package is auto-updated.
Last update: 2025-10-20 01:25:53 UTC
README
PHP Library Intended to Interact with Teli's API
Installation
composer require dutchie027/teli
Overview
Why did I create this API versus using the one Teli provides natively? A few reasons:
- In my opinion guzzle is WAY more powerful than using the cURL library
- Most of the Teli calls are GET calls
- Teli's library exposes the API key in the URI 95% of the time. Sure it's https calls, but that's still asking for trouble
Usage
// require the composer library require_once 'vendor/autoload.php'; require_once 'config.php'; //make the connction to the API for use $api = new dutchie027\Teli\API(TELI_API_TOKEN, TELI_CALL_API_SID_TOKEN); // Add custom settings $api = new dutchie027\Teli\API(TELI_API_TOKEN, TELI_CALL_API_SID_TOKEN, $settings);
Settings
The default settings are fine, however you might want to override the defaults or use your own.NOTE: All settings are optional and you don't need to provide any.
| Field | Type | Description | Default Value |
|---|---|---|---|
log_dir |
string | The directory where the log file is stored | sys_get_temp_dir() |
log_name |
string | The name of the log file that is created in log_dir. If you don't put .log at the end, it will append it |
6 random characters + time() + .log |
log_tag |
string | If you share this log file with other applications, this is the tag used in the log file | vultr |
log_level |
string | The level of logging the application will do. This must be either debug, info, notice, warning, critical or error. If it is not one of those values it will fail to the default |
warning |
Future
- The functions are stubbed out for full feature set of Teli's API, but my main focus ATM is SMS/MMS and Account Management
Contributing
If you're having problems, spot a bug, or have a feature suggestion, file an issue. If you want, feel free to fork the package and make a pull request. This is a work in progresss as I get more info and further test the API.