This repository contains documentation and examples to help you integrate with the PhantomSMS API.
IMPORTANT: The files in this repository use placeholder values for API endpoints and keys. Do NOT hardcode production endpoints or real API keys into these files or into public repositories.
- Set PHANTOMSMS_API_BASE to the base URL of your PhantomSMS API (for example, https://api.example.com).
- Set PHANTOMSMS_API_KEY to your API key.
- Run the example scripts in the
examples/directory after replacing placeholders.
- Python 3.8+ (for Python example)
- Node.js 12+ (for Node.js example)
- PHP 7.4+ (for PHP example)
Clone the repository:
git clone https://github.com/phantomsms/phantomsms-api.git
cd phantomsms-apiExamples are provided in the examples/ directory. Each example reads PHANTOMSMS_API_BASE from the environment and will refuse to run if it remains unset.
Example files:
- examples/python.py
- examples/nodejs.js
- examples/php.php
- Never expose API keys in client-side code or public repositories.
- Use HTTPS for all API requests.
- Rotate keys if you believe they have been exposed.
Contributions are welcome. Open an issue or pull request.