The SMS API provides possibility to send SMS text messages via the system. An end-user must have a valid ticket for the API and be authorized to send SMS to use this API.
Please check External API authorization for instructions how to enable API access to Enduser APIs.
TABLE OF CONTENTS
Create SMS API ticket
- Login to Onecloud enduser portal with your own credentials
- Choose Home
- Choose Tickets
- Add Name to the API ticket and choose Send SMS
- Click Create ticket
- Copy Token from new granted ticket
Send SMS
If you are using Swagger for test, the first step is to authorize yourself with correct token. Instructions for this can be found from External API authorization.
SMS api endpoint can be found from user/sms path.
- Insert destination number in to field
- The the number to send to. This number will be expanded according to the sending user's number plan. For example, if the user's organization has a number plan conversion of 0 -> +468, the user can send to 0890510 and the SMS will be routed to +46890510.
- Change body payload to application/json
- Insert following data to payload and click Execute
{ "smsText": "Test SMS from Onecloud SMS API." }
Screenshot from destination phone
Swagger generated CURL command can also be used for test as below example shows
- Send SMS
curl -X POST "https://onecloud.setera.com/api/user/sms/%2B358409403999?t=970.VDo1YTE0ZGFhZjhiM2EwOWM0" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"smsText\":\"Test SMS from Onecloud SMS API.\"}"
- Response from API
{"validationResult":""}
- Send SMS