NPM package: https://www.npmjs.com/package/checkhim
Official Node.js SDK for phone number verification via checkhim.tech.
npm install checkhimimport CheckHim from 'checkhim';
const client = new CheckHim('ch_test_your_api_key');
async function run() {
try {
const result = await client.verify({ number: '+5511984339000' });
console.log('Valid:', result.valid, '| Carrier:', result.carrier);
} catch (e) {
console.error('Verification failed:', e.message, e.code);
}
}
run();If the API returns an error, it will be thrown as an exception with a message and a code property. Example:
{
"error": "verification failed: Network is forbidden (code: 6)",
"code": "REJECTED_NETWORK"
}We welcome contributions from the community! To contribute:
- Fork this repository and create your branch from
main. - Install dependencies with
npm install. - Write clear, well-documented code and add tests for new features or bug fixes.
- Ensure all tests pass with
npx jest. - Open a pull request with a clear description of your changes and reference any related issues.
For major changes, please open an issue first to discuss what you would like to change.
By contributing, you agree to abide by the Code of Conduct and the project's license.
MIT