ballerinax/vonage.sms Ballerina library
This is a generated connector for Vonage SMS API v1.0.10 OpenAPI specification. With the SMS API you can send SMS from your account and lookup messages both messages that you've sent as well as messages sent to your virtual numbers. Numbers are specified in E.164 format. More SMS API documentation is at https://developer.nexmo.com/messaging/sms/overview.
Before using this connector in your Ballerina application, complete the following:
- Create Vonage account
- Obtain tokens
- Log into Vonage API Dashboard by visiting https://dashboard.nexmo.com/
- Obtain the
API Secretfrom the API Dashboard.
To use the Vonage SMS connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the
ballerinax/vonage.sms module into the Ballerina project.
Step 2: Create a new connector instance
Initialize the connector.
Step 3: Invoke connector operation
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example on how to send an SMS using the connector. You can now provide the API key and API secret obtained from the Vonage API Dashboard in the 'NewMessage' record with other message details.
Send an SMS
bal runcommand to compile and run the Ballerina program.
Released date: 10 months ago
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Current verison: 114