https://github.com/skocimis/java-textflow-client
Java Maven package that helps you send SMS using TextFlow API
https://github.com/skocimis/java-textflow-client
api api-client java java11 javamaven11 maven maven-plugin simple-sms sms sms-api sms-verification text-message
Last synced: 3 months ago
JSON representation
Java Maven package that helps you send SMS using TextFlow API
- Host: GitHub
- URL: https://github.com/skocimis/java-textflow-client
- Owner: Skocimis
- License: isc
- Created: 2023-01-28T19:40:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T03:21:56.000Z (over 2 years ago)
- Last Synced: 2025-01-08T18:41:29.610Z (5 months ago)
- Topics: api, api-client, java, java11, javamaven11, maven, maven-plugin, simple-sms, sms, sms-api, sms-verification, text-message
- Language: Java
- Homepage: https://textflow.me
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
# Java TextFlow client
[](https://mvnrepository.com/artifact/me.textflow/client)
## 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 Java documentation](https://docs.textflow.me/java).
## Installation
java-textflow-client uses Maven. At present the jars *are* available from a public [maven](https://mvnrepository.com/artifact/me.textflow/client) repository.
Use the following dependency in your project to grab via Maven:
```
me.textflow
client
1.0.2
```
## Sample UsageTo 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
```java
import me.textflow.TextFlowClient;...
TextFlowClient textFlowClient = new TextFlowClient("YOUR_API_KEY");
textFlowClient.sendSMS("+3811231234", "Message body...");
```### Handle send message request result
```java
var result = textFlowClient.sendSMS("+3811231234", "Message body...");
System.out.println(result.getMessage());```
### Example properties of the successfully sent message result
`result` is an instance of `TextFlowSendMessageResult`, which has the appropriate getters.
```json
{
"ok": true,
"status": 200,
"message": "Message sent successfully",
"data": {
"to": "+381611231234",
"content": "Dummy message text...",
"countryCode": "RS",
"price": 0.05,
"timestamp": 1674759108881
}
}
```### Example properties of the unsuccessfully sent message result
`result` is an instance of `TextFlowSendMessageResult`, which has the appropriate getters.
```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!