https://github.com/skocimis/textflow-php
PHP library that helps you send SMS using TextFlow API
https://github.com/skocimis/textflow-php
api api-client php php-library php8 simple-sms sms sms-api sms-verification text-message
Last synced: about 2 months ago
JSON representation
PHP library that helps you send SMS using TextFlow API
- Host: GitHub
- URL: https://github.com/skocimis/textflow-php
- Owner: Skocimis
- License: mit
- Created: 2023-01-27T23:56:45.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-23T10:51:37.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T10:43:26.692Z (about 2 months ago)
- Topics: api, api-client, php, php-library, php8, simple-sms, sms, sms-api, sms-verification, text-message
- Language: PHP
- Homepage: https://textflow.me
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Textflow PHP client
[](https://packagist.org/packages/textflow/sms-api)
[](https://packagist.org/packages/textflow/sms-api)## Documentation
Here you will see just a sample usage of sending an SMS, for more instructions (including methods for user verification) check out our [official PHP documentation](https://docs.textflow.me/php).## Installation
`composer require textflow/sms-api`## Sample Usage
To send an SMS, you have to create an API key using the [Textflow dashboard](https://textflow.me/api). When you register an account, you automatically get an API key with one free SMS which you can send anywhere.
### Just send a message
```php
require_once 'vendor/autoload.php';$client = new TextFlowClient("YOUR_API_KEY");
$client->send_sms("+38112312341", "SMS body...");
```### Handle send message request result
```php
$res = $client->send_sms("+38112312341", "SMS body...");if ($res->ok)
var_dump($res->data);
else
var_dump($res->message);
```### Example result object of the successfully sent message
```json
{
"ok": true,
"status": 200,
"message": "Message sent successfully",
"data": {
"to": "+381611231234",
"content": "Dummy message text...",
"country_code": "RS",
"price": 0.05,
"timestamp": 1674759108881
}
}
```### Example result object of the unsuccessfully sent message
```json
{
"ok": false,
"status": 404,
"message": "API key not found"
}
```## Getting help
If you need help installing or using the library, please check the [FAQ](https://textflow.me) first, and contact us at [[email protected]](mailto://[email protected]) if you don't find an answer to your question.
If you've found a bug in the API, package or would like new features added, you are also free to contact us!