Example use case


twilio-example

The screenshot above shows a mockup of an interface you might create to make use of the Twilio connector.

This would allow your users to:

  1. Create an auth for the service in the integration using the auth-only dialog (or retrieve a pre-existing auth if they have already registered)
  2. Select the operation they wish to make use of
  3. Add any necessary inputs for the operation
  4. Submit the call to Twilio

In order to serve this form to your End Users, your backend setup should have:

This setup will help maximize the consistency and efficiency of your application.

For more details, please see our 'Building integrations' guidance on storing users and integrations

Please also see our Building a UI form tutorial for quickstart guide to rendering a form as a UI.

The form fields would make use of the available inputs according to the Twilio input schema

Having retrieved the form details from the user, the final call to the connector would be a POST request to https://api.tray.io/core/v1/connectors/twilio-output/versions/2.1/call with the body of the message being something like:

Copy
Copied
{
  "operation": "send_sms",
  "authId": "9944xxx-xxxx-xxxx-xxxx-xxxx456fd0",
  "input": {
    "from": "+18577633299",
    "to": "+447587123456",
    "body": "Call connector is great!",
    "media_url": "https://acmecorp-images.s3.eu-west-2.amazonaws.com/message.png",
    "status_callback": "https://status.acmecorp.com"
  }
}