ExportConfiguration Resource
The Export Configuration for a resource has two uses:
-
setting automatic generation of files by setting "enabled" to true (in the case of Editions customers)
-
setting the callback method for when the automatic generation of the file has been completed
You can send this via:
The webhook_method must be either GET
or POST
, and webhook_url should be the URL of the service you want to call when the file is available. For email, the email parameter should be an email address.
Resource properties
enabled
type: boolean
If true, Twilio will automatically generate every day's file when the day is over.
webhook_url
type: string<uri>
Stores the URL destination for the method specified in webhook_method.
webhook_method
type: string
Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
resource_type
type: string
The type of communication – Messages, Calls, Conferences, and Participants
url
type: string<uri>
The URL of this resource.
GET https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration
URI parameters
ResourceType
type: string
The type of communication – Messages, Calls, Conferences, and Participants
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.bulkexports.v1.exportConfiguration('Messages')
_10 .then(export_configuration => console.log(export_configuration.enabled));
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_method": "",
_10 "resource_type": "Messages"
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.bulkexports.v1.exportConfiguration('Calls')
_10 .then(export_configuration => console.log(export_configuration.enabled));
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_method": "",
_10 "resource_type": "Calls"
POST https://bulkexports.twilio.com/v1/Exports/{ResourceType}/Configuration
URI parameters
ResourceType
type: string
The type of communication – Messages, Calls, Conferences, and Participants
Request body parameters
Enabled
type: boolean
If true, Twilio will automatically generate every day's file when the day is over.
WebhookUrl
type: string<uri>
Stores the URL destination for the method specified in webhook_method.
WebhookMethod
type: string
Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
_13// Download the helper library from https://www.twilio.com/docs/node/install
_13// Find your Account SID and Auth Token at twilio.com/console
_13// and set the environment variables. See http://twil.io/secure
_13const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13const authToken = process.env.TWILIO_AUTH_TOKEN;
_13const client = require('twilio')(accountSid, authToken);
_13client.bulkexports.v1.exportConfiguration('Messages')
_13 webhookMethod: 'GET',
_13 webhookUrl: 'https://api.your-infrastructure.com/receive-messages/'
_13 .then(export_configuration => console.log(export_configuration.enabled));
_10 "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
_10 "webhook_url": "https://api.your-infrastructure.com/receive-messages/",
_10 "resource_type": "Messages",
_10 "webhook_method": "GET"