- Print
- DarkLight
- PDF
Copy folder Twilio "SMS" to your workspace.
There are two processes in this folder:
"Sending SMS" - for sending SMS via Twilio API
How it works
The first process sends SMS and copies the request with reference = {{sid}}
(unique message ID) to the second process for getting callback.
The second process receives a callback from Twilio and modifies the task in the first process by adding a status.
To send SMS via API Twilio and get a callback do the following steps in your processes:
- Click the node
Waiting for Callback
, press Copy near callback url and it will be copied to clipboard.
- Click on the "Calling API" node. In the Call API logic configuration panel, add the received callback url to the value of the StatusCallback parameter.
For example, you get callback url -
https://corezoid.com/api/1/json/callback/559a817f4b8ff96bf5000b/cb9f670f5c223ec42e1
The parameter value StatusCallback
will be -
https://corezoid.com/api/1/nvp/callback/559a817f4b8ff96bf5000b/cb9f670f5c223ec42e1/
add at the end
Press Deploy to commit changes.
To test sending SMS switch process "Sending SMS" to View mode .
Press button + New task.
Enter the parameter values:
AuthToken
- Your AuthTokenAccountSid
- Your AccountSidNumber_to
- recipient's phone number with "+" and the country codeNumber_from
- Your phone number TwilioBody
- text of the message (up to 1600 characters)
and press Add task.
As a result, the task will pass through the process and go to one of the final nodes (red or green).
The process is prepared to call from other processes using logic `Call Process.
In case of successful execution the following parameters will be added to the task:
status
- message statussid
- unique message identifier
If API Twilio returns an error, the task will go to the escalation node and the following parameters will be added:
code
- error code Twiliomessage
- text error Twiliourl_more_info
- link to the website Twilio, where there is a detailed description of the caused error.
In case of error while calling API Twilio, the task will go to the escalation node and the following parameters will be added:
code
- code errormessage
- text error
Useful links Twilio:
- Description of input parameters of Twilio API "Sending SMS"