Twilio Integration with Oracle APEX 22.1
View List of Twilio Sent Messages
- Get Twilio Account SID, AUTH Token and Phone Number
- Get Twilio View Messages List API End Point
- Invoke Twilio View Messages List API with Postman
- Display the Twilio data in the form of report using APEX_WEB_SERVICE API
I) Get Twilio Account SID, AUTH Token and Phone Number
II) Get Twilio View Messages List API End Point
III) Invoke Twilio View Messages List API with Postman
Step 1: Define Twilio Account Id as global variable (account_sid) in postman. Click "Environment Quick Look" to define global variables.
Step 2: Setup Authorization (Basic Authentication) and click "Send" button to call the API.
IV) Display the Twilio data in the form of report using APEX_WEB_SERVICE API
Step 2: Create a new region on the page (Position: Content Body). In the Property Editor, apply the following changes:
SQL Query:
API Success Response:
{
"first_page_uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages.json?PageSize=50&Page=0",
"end": 10,
"previous_page_uri": null,
"messages": [
{
"body": "Sent from your Twilio trial account - Thanks for showing interest to join with Oracle APEX Community\nhttps://m.twil.io/HY8a0BbXU9",
"num_segments": "1",
"direction": "outbound-api",
"from": "+17755227844",
"date_updated": "Wed, 11 May 2022 12:36:11 +0000",
"price": "-0.08950",
"error_message": null,
"uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83.json",
"account_sid": "AC2b7b7fffbc349c2f59c82f5bdaa0fd2b",
"num_media": "1",
"to": "+971582036853",
"date_created": "Wed, 11 May 2022 12:36:05 +0000",
"status": "delivered",
"sid": "MM625c2e6a96f54f3ebde032c6c4389d83",
"date_sent": "Wed, 11 May 2022 12:36:06 +0000",
"messaging_service_sid": null,
"error_code": null,
"price_unit": "USD",
"api_version": "2010-04-01",
"subresource_uris": {
"media": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83/Media.json",
"feedback": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83/Feedback.json"
}
}
],
"uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages.json?PageSize=50&Page=0",
"page_size": 50,
"start": 0,
"next_page_uri": null,
"page": 0
}
"messages" array has 21 fields.
{
"first_page_uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages.json?PageSize=50&Page=0",
"end": 10,
"previous_page_uri": null,
"messages": [
{
"body": "Sent from your Twilio trial account - Thanks for showing interest to join with Oracle APEX Community\nhttps://m.twil.io/HY8a0BbXU9",
"num_segments": "1",
"direction": "outbound-api",
"from": "+17755227844",
"date_updated": "Wed, 11 May 2022 12:36:11 +0000",
"price": "-0.08950",
"error_message": null,
"uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83.json",
"account_sid": "AC2b7b7fffbc349c2f59c82f5bdaa0fd2b",
"num_media": "1",
"to": "+971582036853",
"date_created": "Wed, 11 May 2022 12:36:05 +0000",
"status": "delivered",
"sid": "MM625c2e6a96f54f3ebde032c6c4389d83",
"date_sent": "Wed, 11 May 2022 12:36:06 +0000",
"messaging_service_sid": null,
"error_code": null,
"price_unit": "USD",
"api_version": "2010-04-01",
"subresource_uris": {
"media": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83/Media.json",
"feedback": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages/MM625c2e6a96f54f3ebde032c6c4389d83/Feedback.json"
}
}
],
"uri": "/2010-04-01/Accounts/AC2b7b7fffbc349c2f59c82f5bdaa0fd2b/Messages.json?PageSize=50&Page=0",
"page_size": 50,
"start": 0,
"next_page_uri": null,
"page": 0
}
Comments
Post a Comment