Package Exports
- textflow.js
- textflow.js/textflow.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (textflow.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
textflow.js
Supported Node.js Versions
- Node.js 14
- Node.js 16
- Node.js 18
Installation
npm install textflow.js
or yarn add textflow.js
Sample Usage
Just send a message
const textflow = require("textflow.js");
textflow.useKey("YOUR_API_KEY"); //You can create one in the API Console at https://textflow.me
textflow.sendSMS("+381611231234", "Dummy message text...");
Provide custom callback
textflow.sendSMS("+381611231234", "Dummy message text...", (result) => {
if (result.ok) {
console.log("SUCCESS");
}
})
Await response
async function async_function() {
let result = await textflow.sendSMS("+381611231234", "Dummy message text...");
console.log(result);
}
async_function();
Example of the result of a successfully sent message
{
"ok": true,
"status": 200,
"message": "Message sent successfully",
"data": {
"to": "+381611231234",
"content": "Dummy message text...",
"country_code": "RS",
"price": 0.05,
"timestamp": 1674759108881
}
}
Example of the result of an unsuccessfully sent message
{
"ok": false,
"status": 404,
"message": "API key not found"
}
Getting help
If you need help installing or using the library, please check the FAQ first, and contact us at support@textflow.me 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!