checkhim / php
SDK for integrating with the CheckHim API to verify active phone numbers.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/checkhim/php
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2026-01-15 11:39:45 UTC
README
Official SDK for integrating with the CheckHim API (https://checkhim.tech) to verify if a phone number is active.
Installation
Via Composer:
composer require checkhim/php
Basic Usage
require 'vendor/autoload.php'; use CheckHim\CheckHim; $client = new CheckHim('ch_test_your_api_key'); try { $r = $client->verify('+5511984339000'); echo "Valid: " . ($r['valid'] ? 'yes' : 'no') . " Carrier: " . $r['carrier'] . PHP_EOL; } catch (Exception $e) { echo "Error: {$e->getMessage()}" . PHP_EOL; }
Response Example
{
"carrier": "TIM",
"valid": true
}
If the API returns an error, the response will be:
{
"error": "verification failed: Network is forbidden (code: 6)",
"code": "REJECTED_NETWORK",
"http_status": 400
}
Documentation
Contributing
Contributions are welcome! To contribute:
- Fork this repository and create your branch from
main. - Install dependencies with
composer install. - Write clear, tested code and add/adjust tests in the
tests/directory. - Run tests locally with:
php vendor/bin/phpunit --testdox - Open a Pull Request with a clear description of your changes.
For bug reports or feature requests, please open an issue.
License
MIT