twilio_dart_api 0.0.1 copy "twilio_dart_api: ^0.0.1" to clipboard
twilio_dart_api: ^0.0.1 copied to clipboard

A Package that helps with twilio API. Supports to send twilio programmable SMS and retrive all messages data from twilio.

Twilio Dart #

A Dart package which helps developers with Twilio API services.

Features #

  • Send SMS programmatically;
  • Get all SMS related to a Twilio account;

Getting Started #

Add the dependency to your pubspec.yaml file.

dependencies:
  twilio_dart_api: ^0.0.1

How to use #

Create a new Object

Twilio twilio = Twilio(
  accountSid : '*************************', // replace *** with Account SID
  authToken : 'xxxxxxxxxxxxxxxxxx',  // replace xxx with Auth Token
  twilioNumber : '+...............'  // replace .... with Twilio Number
);

Now you can use any instance of following

twilio.messages
twilio.credential

Send Message

//Use sendMessage with the recipient number and message body.
twilio.messages.sendMessage(String toNumber, [String message = ""]);

View Message List

//Returns list of SMS
//pageSize defaults to 10
//Filter out numbers also

MessagesData messagesData = await twilio.getMessageList({
  int pageSize = 10,
  String? toNumber,
  String? fromNumber,
});

Change Twilio Number

twilio.credential.changeNumber(
  '+.........'
); // To change the twilio number

Issues and feedback 💭 #

If you have any suggestion for including a feature or if something doesn't work, feel free to open a Github issue for us to have a discussion on it.

2
likes
130
points
21
downloads

Publisher

verified publishermibus-app.com.ar

Weekly Downloads

A Package that helps with twilio API. Supports to send twilio programmable SMS and retrive all messages data from twilio.

Documentation

API reference

License

MIT (license)

Dependencies

http, intl

More

Packages that depend on twilio_dart_api