REST API: Notifications [廃止予定]

Notificationsリソースは廃止予定であり、Alertsリソースに置き換えられえ、Twilio APIの将来のバージョンで削除される可能性があります。


Alerts リソースは Notifications のスーパーセットなので、今後はこれを使用することを推奨します。

Notification インスタンス リソースは、REST API を使用して通話中に、Twilio によって生成される単一のログ エントリを表現します。 デバッグに使用できます。 Notifications リスト リソースは、あるアカウントに対して生成された通知のセットです。

Call インスタンス リソースのサブリソースとして、Notifications リスト リソースも用意されています。 このリソースは個々の通話を対象としているため、元の通話から通知へと直接たどることができます。

Notification インスタンス リソース

このリソースは、個々の通知を表現します。

リソースURI

/2010-04-01/Accounts/{AccountSid}/Notifications/{NotificationSid}

リソースのプロパティ

Notification リソースには、次のプロパティがあります。

注意事項: REST API の他の部分と違い、Notification インスタンスの表現は、リスト リソースからのレスポンス内の Notification の表現とは異なります。 通知の中のデータ量が膨大になる可能性があるため、完全な HTTP リクエストとレスポンス データは Notification インスタンス リソース 表現の表現でしか返却されません。
プロパティ 説明
Sid このリソースを一意に識別する 34 文字の文字列です。
DateCreated このリソースが生成された日付です。RFC 2822形式を使用します。
DateUpdated このリソースが最後に更新された日付です。RFC 2822形式を使用します。
AccountSid この通知に関連する アカウント のユニーク ID です。
CallSid CallSid は、通知が生成された通話のユニークな ID です。 特定の通話と無関係に REST API で生成された通知の場合は、空になります。
ApiVersion 通知が生成された時に使用された、Twilio のバージョンです。 着信通話などの、特定の API バージョンのないイベントでは、空になる場合があります。
Log 通知の種類に対応した、整数値のログ レベルです。0ERROR1WARNINGです。
ErrorCode エラーの状態を示すユニークなエラー コードです。 Twilio の エラー コード リファレンスで、エラーとその原因や解決策を調べることができます。
MoreInfo このエラーに関する詳しい情報を得られる URL です。 URL は Twilio の エラー コード リファレンスのページです。
MessageText 通知のテキスト内容です。
MessageDate この通知が実際に生成された日付です。 RFC 2822 フォーマットを使用します。 バッファリングのため、この日付は DateCreated の日付とは少し異なる場合があります。
Request URL 通知を生成したリソースの URL です。
通話中に通知が生成された場合:
通知の原因となった、ユーザーのサーバー上の、リソースの URL です。
REST API 使用中に通知が生成された場合 :
ユーザーがリクエストを発行しようとした、Twilio のサーバー上の、REST リソースの URL です。
RequestMethod 通知が生成されたリクエストに使用された HTTP メソッドです。
通話中に通知が生成された場合:
ユーザーのサーバー上のリソースへのリクエストに使用された HTTP メソッドです。
REST API 使用中に通知が生成された場合 :
Twilio のサーバー上の REST リソースへのリクエストに使用された HTTP メソッドです。
RequestVariables Twilio が生成し、ユーザーのサーバーへ送信された HTTP GET または POST 変数です。 または、通知が REST API により生成された場合は、このフィールドには REST API に送信された HTTP POST または PUT 変数が含まれます。
レスポンスヘッダー ユーザーのサーバーから返却された HTTP ヘッダーです。
ResponseBody ユーザーのサーバーから返却された HTTP ボディーです。
URI このリソースのURIで、右記のURLに対する相対パスです https://api.twilio.com

HTTP GET

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client
  .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
  .get((err, notification) => {
    console.log(notification.messageText);
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client
  .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
  .fetch()
  .then(notification => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notification = twilio.GetNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
    
    Console.WriteLine(notification.MessageText);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$notification = $client->account->notifications->get("NO5a7a84730f529f0a76b3e30c01315d1a");
echo $notification->message_text;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
notification = client.account.notifications
                     .get('NO5a7a84730f529f0a76b3e30c01315d1a')
puts notification.message_text
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notification = NotificationResource.Fetch("NO5a7a84730f529f0a76b3e30c01315d1a");

        Console.WriteLine(notification.MessageText);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$notification = $client->account
    ->notifications("NO5a7a84730f529f0a76b3e30c01315d1a")
    ->fetch();

echo $notification->messageText;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

notification = client.notifications.get("NO5a7a84730f529f0a76b3e30c01315d1a")
print(notification.message_text)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@notification = @client.api
                       .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
                       .fetch

puts @notification.message_text
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = client.getAccount().getNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
    System.out.println(notification.getMessageText());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

notification = client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a") \
                     .fetch()

print(notification.message_text)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = Notification.fetcher("NO5a7a84730f529f0a76b3e30c01315d1a").fetch();

    System.out.println(notification.getMessageText());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
	"sid": "NO5a7a84730f529f0a76b3e30c01315d1a",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"call_sid": "CAa8857b0dcc71b4909aced594f7f87453",
	"log": "0",
	"error_code": "11205",
	"more_info": "http:\/\/www.twilio.com\/docs\/errors\/11205",
	"message_text": "EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3",
	"message_date": "Tue, 09 Feb 2010 01:23:53 +0000",
	"response_body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n\t<Play>4min19secs.mp3<\/Play>\n<\/Response>\n",
	"request_method": "GET",
	"request_url": "http:\/\/demo.twilio.com\/welcome",
	"request_variables": "AccountSid=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&CallStatus=in-progress&Called=4152374451&CallerCountry=US&CalledZip=94937&CallerCity=&Caller=4150000000&CalledCity=INVERNESS&CalledCountry=US&DialStatus=answered&CallerState=California&CallSid=CAa8857b0dcc71b4909aced594f7f87453&CalledState=CA&CallerZip=",
	"response_headers": "Date=Tue%2C+09+Feb+2010+01%3A23%3A38+GMT&Vary=Accept-Encoding&Content-Length=91&Content-Type=text%2Fxml&Accept-Ranges=bytes&Server=Apache%2F2.2.3+%28CentOS%29&X-Powered-By=PHP%2F5.1.6",
	"date_created": "Tue, 09 Feb 2010 01:23:53 +0000",
	"api_version": "2008-08-01",
	"date_updated": "Tue, 09 Feb 2010 01:23:53 +0000",
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications\/NO5a7a84730f529f0a76b3e30c01315d1a.json"
}
<TwilioResponse>
	<Notification>
		<Sid>NO5a7a84730f529f0a76b3e30c01315d1a</Sid>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<CallSid>CAa8857b0dcc71b4909aced594f7f87453</CallSid>
		<Log>0</Log>
		<ErrorCode>11205</ErrorCode>
		<MoreInfo>http://www.twilio.com/docs/errors/11205</MoreInfo>
		<MessageText>
			EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3
		</MessageText>
		<MessageDate>Tue, 09 Feb 2010 01:23:53 +0000</MessageDate>
		<ResponseBody>
			<?xml version="1.0" encoding="UTF-8"?>&#10;<Response>&#10;&#9;<Play>4min19secs.mp3</Play>&#10;</Response>&#10;
		</ResponseBody>
		<RequestMethod>POST</RequestMethod>
		<RequestUrl>http://demo.twilio.com/welcome</RequestUrl>
		<RequestVariables>
			AccountSid=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&CallStatus=in-progress&Called=4152374451&CallerCountry=US&CalledZip=94937&CallerCity=&Caller=4150000000&CalledCity=INVERNESS&CalledCountry=US&DialStatus=answered&CallerState=California&CallSid=CAa8857b0dcc71b4909aced594f7f87453&CalledState=CA&CallerZip=
		</RequestVariables>
		<ResponseHeaders>
			Date=Tue%2C+09+Feb+2010+01%3A23%3A38+GMT&Vary=Accept-Encoding&Content-Length=91&Content-Type=text%2Fxml&Accept-Ranges=bytes&Server=Apache%2F2.2.3+%28CentOS%29&X-Powered-By=PHP%2F5.1.6
		</ResponseHeaders>
		<DateCreated>Tue, 09 Feb 2010 01:23:53 +0000</DateCreated>
		<ApiVersion>2008-08-01</ApiVersion>
		<DateUpdated>Tue, 09 Feb 2010 01:23:53 +0000</DateUpdated>
		<Uri>
			/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a
		</Uri>
	</Notification>
</TwilioResponse>
Notificationを取得する

HTTP POST

サポートしません。

HTTP PUT

サポートしません。

HTTP DELETE

{NotificationSid} で識別される通知を、アカウントのログから削除します。 削除に成功すると、ボディーのない HTTP 204 (No Content) レスポンスを返します。

サンプル
コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid NO5a7a84730f529f0a76b3e30c01315d1a deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const notificationSid = 'NO5a7a84730f529f0a76b3e30c01315d1a';

client.notifications(notificationSid)
  .remove()
  .then(() => console.log(`Sid ${notificationSid} deleted successfully.`))
  .catch((err) => console.log(err.status));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->notifications->delete("NO5a7a84730f529f0a76b3e30c01315d1a");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@notification = @client.account.notifications.get("NO5a7a84730f529f0a76b3e30c01315d1a")
@notification.delete
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        NotificationResource.Delete("NO5a7a84730f529f0a76b3e30c01315d1a");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->account
    ->notifications("NO5a7a84730f529f0a76b3e30c01315d1a")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.notifications.delete("NO5a7a84730f529f0a76b3e30c01315d1a")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@notification = @client.api
                       .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
                       .fetch

@notification.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = client.getAccount().getNotification("NO5a7a84730f529f0a76b3e30c01315d1a");

    notification.delete();

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification.deleter("NO5a7a84730f529f0a76b3e30c01315d1a").delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
通知を削除する

Notifications リスト リソース

リソースURI

/2010-04-01/Accounts/{AccountSid}/Notifications
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications

HTTP GET

アカウントに対して生成された通知のリストを返します。 このリストは ページ情報 を含みます。ページ情報は DateUpdated パラメーターでソートされ、最も新しい通知が先頭になります。

リストフィルター

下記のGETのクエリー文字列パラメーターを使用すると、返される一覧を制限することができます。 パラメーターは大文字と小文字を区別することに注意してください:

パラメーター 説明
Log 上述の整数値のログ値を適用して、このログの通知を返します。
MessageDate この日付の通知のみを返します。 YYYY-MM-DD 形式で表記します。 また、不等号も指定できます。たとえば、MessageDate<=YYYY-MM-DD とすると、この日の午前 0 時以前に記録されたメッセージを返し、MessageDate>=YYYY-MM-DD とすると、この日の午前 0 時以降に記録されたメッセージを返します。
例 1
コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list(function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.MessageText);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.notifications
  .each((notification) => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(null, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.MessageText);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications as $notification) {
    echo $notification->message_text;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Loop over notifications and print out a property for each one
@client.account.notifications.list.each do |notification|
  puts notification.message_text
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read();

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.MessageText);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->read() as $notification) {
    echo $notification->messageText;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list.each do |notification|
  puts notification.message_text
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    NotificationList notifications = client.getAccount().getNotifications();
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
for notification in client.notifications.list():
    print(notification.message_text)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader().read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
	"page": 0,
	"page_size": 50,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json",
	"first_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json?Page=0&PageSize=50",
	"previous_page_uri": null,
	"next_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json?Page=1&PageSize=50",
	"notifications": [
		{
			"sid": "NO5a7a84730f529f0a76b3e30c01315d1a",
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"call_sid": "CAa8857b0dcc71b4909aced594f7f87453",
			"log": "0",
			"error_code": "11205",
			"more_info": "http:\/\/www.twilio.com\/docs\/errors\/11205",
			"message_text": "EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3",
			"message_date": "Tue, 09 Feb 2010 01:23:53 +0000",
			"request_method": "POST",
			"request_url": "http:\/\/demo.twilio.com\/welcome",
			"date_created": "Tue, 09 Feb 2010 01:23:53 +0000",
			"api_version": "2008-08-01",
			"date_updated": "Tue, 09 Feb 2010 01:23:53 +0000",
			"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications\/NO5a7a84730f529f0a76b3e30c01315d1a.json"
		},
		...
	]
}
<TwilioResponse>
	<Notifications page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications?Page=0&PageSize=50" previouspageuri="" nextpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications?Page=1&PageSize=50">
		<Notification>
			<Sid>NO5a7a84730f529f0a76b3e30c01315d1a</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<CallSid>CAa8857b0dcc71b4909aced594f7f87453</CallSid>
			<Log>0</Log>
			<ErrorCode>11205</ErrorCode>
			<MoreInfo>http://www.twilio.com/docs/errors/11205</MoreInfo>
			<MessageText>EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3</MessageText>
			<MessageDate>Tue, 09 Feb 2010 01:23:53 +0000</MessageDate>
			<RequestMethod>POST</RequestMethod>
			<RequestUrl>http://demo.twilio.com/welcome</RequestUrl>
			<DateCreated>Tue, 09 Feb 2010 01:23:53 +0000</DateCreated>
			<ApiVersion>2008-08-01</ApiVersion>
			<DateUpdated>Tue, 09 Feb 2010 01:23:53 +0000</DateUpdated>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a</Uri>
		</Notification>
		...
	</Notifications>
</TwilioResponse>
Notificationをフィルタリングする
例 2

2009 年 7 月 6 日に生成された、警告のみを返します。

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ messageDate: "2009-07-06",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.MessageText);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {messageDate: '2016-07-06'};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, new DateTime(2009, 07, 06), null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.MessageText);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate" => "2009-07-06",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->message_text;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :message_date => "2009-07-06",
  :log => "1"}).each do |notification|
  puts notification.message_text
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(
            log: 1,
            messageDate: new DateTime(2009, 07, 06));

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.MessageText);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array("messageDate" => "2009-07-06", "log" => "1")
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->messageText;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(message_date="2009-07-06", log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date: Time.new('2009-07-06'),
  log: '1'
).each do |notification|
  puts notification.message_text
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate", "2009-07-06");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date=date(2009, 7, 6), log="1")
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(LocalDate.parse("2009-07-06"))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
パラメーターを使用してNotificationをフィルタリングする
例 3

2009 年 7 月 6 日、またはこの日の午前 0 時以降に生成された、警告のみを返します。

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ "messageDate>": "2009-07-06",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.RequestUrl);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {messageDateAfter: '2016-07-06'};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.requestUrl));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.RequestUrl);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate>" => "2009-07-06",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->request_url;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :"message_date>" => "2009-07-06",
  :log => "1"}).each do |notification|
  puts notification.request_url
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(log: 1);

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.RequestUrl);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array("messageDate" => "2009-07-06", "log" => "1")
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->requestUrl;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(after=date(2009, 7, 6), log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date_after: Time.new('2009-07-06'),
  log: '1'
).each do |notification|
  puts notification.request_url
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate>", "2009-07-06");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date_after=date(2009, 7, 6), log="1")

for notification in notifications:
    print(notification.request_url)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.google.common.collect.Range;
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(Range.atLeast(LocalDate.parse("2009-07-06")))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate>=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate>=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
制限を使用してNotificationをフィルタリングする
例 4

2009 年 7 月 4 日午前 0 時から 2009 年 7 月 6 日午前 0 時の間に生成された、警告のみを返します。

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ "messageDate>": "2009-07-06",
    "messageDate<": "2009-07-08",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.RequestUrl);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {
  messageDateAfter: '2016-07-06',
  messageDateBefore: '2016-07-08',
  log: '1',
};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.requestUrl));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.RequestUrl);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate>" => "2009-07-06",
    "MessageDate<" => "2009-07-08",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->request_url;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :"message_date>" => "2009-07-06",
  :"message_date<" => "2009-07-08",
  :log => "1"}).each do |notification|
  puts notification.request_url
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(log: 1);

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.RequestUrl);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array(
        "messagedateAfter" => "2009-07-06",
        "messagedateBefore" => "2009-07-08",
        "log" => "1"
    )
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->requestUrl;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(after=date(2009, 7, 6),
    before=date(2009, 7, 8),
    log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date_after: Time.new('2009-07-06'),
  message_date_before: Time.new('2009-07-08'),
  log: '1'
).each do |notification|
  puts notification.request_url
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate>", "2009-07-06");
    params.put("MessageDate<", "2009-07-08");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date_after=date(2009, 7, 6),
                            message_date_before=date(2009, 7, 8),
                            log="1")

for notification in notifications:
    print(notification.request_url)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.DateTime;

import com.google.common.collect.Range;
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    DateTime lower = DateTime.parse("2009-07-06");
    DateTime higher = DateTime.parse("2009-07-08");

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(Range.closed(lower, higher))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate>=2009-07-06" \
    -d "MessageDate<=2009-07-08" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate>=2009-07-06" \
    -d "MessageDate<=2009-07-08" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
範囲によってNotificationをフィルタリングする

HTTP POST

サポートしません。

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

コードサンプルを読み込んでいます...
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client
  .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
  .get((err, notification) => {
    console.log(notification.messageText);
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client
  .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
  .fetch()
  .then(notification => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notification = twilio.GetNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
    
    Console.WriteLine(notification.MessageText);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$notification = $client->account->notifications->get("NO5a7a84730f529f0a76b3e30c01315d1a");
echo $notification->message_text;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
notification = client.account.notifications
                     .get('NO5a7a84730f529f0a76b3e30c01315d1a')
puts notification.message_text
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notification = NotificationResource.Fetch("NO5a7a84730f529f0a76b3e30c01315d1a");

        Console.WriteLine(notification.MessageText);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$notification = $client->account
    ->notifications("NO5a7a84730f529f0a76b3e30c01315d1a")
    ->fetch();

echo $notification->messageText;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

notification = client.notifications.get("NO5a7a84730f529f0a76b3e30c01315d1a")
print(notification.message_text)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@notification = @client.api
                       .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
                       .fetch

puts @notification.message_text
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = client.getAccount().getNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
    System.out.println(notification.getMessageText());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

notification = client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a") \
                     .fetch()

print(notification.message_text)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = Notification.fetcher("NO5a7a84730f529f0a76b3e30c01315d1a").fetch();

    System.out.println(notification.getMessageText());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
	"sid": "NO5a7a84730f529f0a76b3e30c01315d1a",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"call_sid": "CAa8857b0dcc71b4909aced594f7f87453",
	"log": "0",
	"error_code": "11205",
	"more_info": "http:\/\/www.twilio.com\/docs\/errors\/11205",
	"message_text": "EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3",
	"message_date": "Tue, 09 Feb 2010 01:23:53 +0000",
	"response_body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n\t<Play>4min19secs.mp3<\/Play>\n<\/Response>\n",
	"request_method": "GET",
	"request_url": "http:\/\/demo.twilio.com\/welcome",
	"request_variables": "AccountSid=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&CallStatus=in-progress&Called=4152374451&CallerCountry=US&CalledZip=94937&CallerCity=&Caller=4150000000&CalledCity=INVERNESS&CalledCountry=US&DialStatus=answered&CallerState=California&CallSid=CAa8857b0dcc71b4909aced594f7f87453&CalledState=CA&CallerZip=",
	"response_headers": "Date=Tue%2C+09+Feb+2010+01%3A23%3A38+GMT&Vary=Accept-Encoding&Content-Length=91&Content-Type=text%2Fxml&Accept-Ranges=bytes&Server=Apache%2F2.2.3+%28CentOS%29&X-Powered-By=PHP%2F5.1.6",
	"date_created": "Tue, 09 Feb 2010 01:23:53 +0000",
	"api_version": "2008-08-01",
	"date_updated": "Tue, 09 Feb 2010 01:23:53 +0000",
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications\/NO5a7a84730f529f0a76b3e30c01315d1a.json"
}
<TwilioResponse>
	<Notification>
		<Sid>NO5a7a84730f529f0a76b3e30c01315d1a</Sid>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<CallSid>CAa8857b0dcc71b4909aced594f7f87453</CallSid>
		<Log>0</Log>
		<ErrorCode>11205</ErrorCode>
		<MoreInfo>http://www.twilio.com/docs/errors/11205</MoreInfo>
		<MessageText>
			EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3
		</MessageText>
		<MessageDate>Tue, 09 Feb 2010 01:23:53 +0000</MessageDate>
		<ResponseBody>
			<?xml version="1.0" encoding="UTF-8"?>&#10;<Response>&#10;&#9;<Play>4min19secs.mp3</Play>&#10;</Response>&#10;
		</ResponseBody>
		<RequestMethod>POST</RequestMethod>
		<RequestUrl>http://demo.twilio.com/welcome</RequestUrl>
		<RequestVariables>
			AccountSid=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&CallStatus=in-progress&Called=4152374451&CallerCountry=US&CalledZip=94937&CallerCity=&Caller=4150000000&CalledCity=INVERNESS&CalledCountry=US&DialStatus=answered&CallerState=California&CallSid=CAa8857b0dcc71b4909aced594f7f87453&CalledState=CA&CallerZip=
		</RequestVariables>
		<ResponseHeaders>
			Date=Tue%2C+09+Feb+2010+01%3A23%3A38+GMT&Vary=Accept-Encoding&Content-Length=91&Content-Type=text%2Fxml&Accept-Ranges=bytes&Server=Apache%2F2.2.3+%28CentOS%29&X-Powered-By=PHP%2F5.1.6
		</ResponseHeaders>
		<DateCreated>Tue, 09 Feb 2010 01:23:53 +0000</DateCreated>
		<ApiVersion>2008-08-01</ApiVersion>
		<DateUpdated>Tue, 09 Feb 2010 01:23:53 +0000</DateUpdated>
		<Uri>
			/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a
		</Uri>
	</Notification>
</TwilioResponse>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid NO5a7a84730f529f0a76b3e30c01315d1a deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const notificationSid = 'NO5a7a84730f529f0a76b3e30c01315d1a';

client.notifications(notificationSid)
  .remove()
  .then(() => console.log(`Sid ${notificationSid} deleted successfully.`))
  .catch((err) => console.log(err.status));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteNotification("NO5a7a84730f529f0a76b3e30c01315d1a");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->notifications->delete("NO5a7a84730f529f0a76b3e30c01315d1a");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@notification = @client.account.notifications.get("NO5a7a84730f529f0a76b3e30c01315d1a")
@notification.delete
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        NotificationResource.Delete("NO5a7a84730f529f0a76b3e30c01315d1a");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->account
    ->notifications("NO5a7a84730f529f0a76b3e30c01315d1a")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.notifications.delete("NO5a7a84730f529f0a76b3e30c01315d1a")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@notification = @client.api
                       .notifications('NO5a7a84730f529f0a76b3e30c01315d1a')
                       .fetch

@notification.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification notification = client.getAccount().getNotification("NO5a7a84730f529f0a76b3e30c01315d1a");

    notification.delete();

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.notifications("NO5a7a84730f529f0a76b3e30c01315d1a") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Notification.deleter("NO5a7a84730f529f0a76b3e30c01315d1a").delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list(function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.MessageText);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.notifications
  .each((notification) => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(null, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.MessageText);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications as $notification) {
    echo $notification->message_text;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Loop over notifications and print out a property for each one
@client.account.notifications.list.each do |notification|
  puts notification.message_text
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read();

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.MessageText);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->read() as $notification) {
    echo $notification->messageText;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list.each do |notification|
  puts notification.message_text
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    NotificationList notifications = client.getAccount().getNotifications();
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
for notification in client.notifications.list():
    print(notification.message_text)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader().read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
	"page": 0,
	"page_size": 50,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json",
	"first_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json?Page=0&PageSize=50",
	"previous_page_uri": null,
	"next_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications.json?Page=1&PageSize=50",
	"notifications": [
		{
			"sid": "NO5a7a84730f529f0a76b3e30c01315d1a",
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"call_sid": "CAa8857b0dcc71b4909aced594f7f87453",
			"log": "0",
			"error_code": "11205",
			"more_info": "http:\/\/www.twilio.com\/docs\/errors\/11205",
			"message_text": "EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3",
			"message_date": "Tue, 09 Feb 2010 01:23:53 +0000",
			"request_method": "POST",
			"request_url": "http:\/\/demo.twilio.com\/welcome",
			"date_created": "Tue, 09 Feb 2010 01:23:53 +0000",
			"api_version": "2008-08-01",
			"date_updated": "Tue, 09 Feb 2010 01:23:53 +0000",
			"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Notifications\/NO5a7a84730f529f0a76b3e30c01315d1a.json"
		},
		...
	]
}
<TwilioResponse>
	<Notifications page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications?Page=0&PageSize=50" previouspageuri="" nextpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications?Page=1&PageSize=50">
		<Notification>
			<Sid>NO5a7a84730f529f0a76b3e30c01315d1a</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<CallSid>CAa8857b0dcc71b4909aced594f7f87453</CallSid>
			<Log>0</Log>
			<ErrorCode>11205</ErrorCode>
			<MoreInfo>http://www.twilio.com/docs/errors/11205</MoreInfo>
			<MessageText>EmailNotification=false&LogLevel=ERROR&sourceComponent=13400&Msg=HTTP+Connection+Failure+-+Read+timed+out&ErrorCode=11205&msg=HTTP+Connection+Failure+-+Read+timed+out&url=4min19secs.mp3</MessageText>
			<MessageDate>Tue, 09 Feb 2010 01:23:53 +0000</MessageDate>
			<RequestMethod>POST</RequestMethod>
			<RequestUrl>http://demo.twilio.com/welcome</RequestUrl>
			<DateCreated>Tue, 09 Feb 2010 01:23:53 +0000</DateCreated>
			<ApiVersion>2008-08-01</ApiVersion>
			<DateUpdated>Tue, 09 Feb 2010 01:23:53 +0000</DateUpdated>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NO5a7a84730f529f0a76b3e30c01315d1a</Uri>
		</Notification>
		...
	</Notifications>
</TwilioResponse>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ messageDate: "2009-07-06",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.MessageText);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {messageDate: '2016-07-06'};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.messageText));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, new DateTime(2009, 07, 06), null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.MessageText);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate" => "2009-07-06",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->message_text;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :message_date => "2009-07-06",
  :log => "1"}).each do |notification|
  puts notification.message_text
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(
            log: 1,
            messageDate: new DateTime(2009, 07, 06));

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.MessageText);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array("messageDate" => "2009-07-06", "log" => "1")
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->messageText;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(message_date="2009-07-06", log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date: Time.new('2009-07-06'),
  log: '1'
).each do |notification|
  puts notification.message_text
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate", "2009-07-06");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date=date(2009, 7, 6), log="1")
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(LocalDate.parse("2009-07-06"))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getMessageText());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ "messageDate>": "2009-07-06",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.RequestUrl);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {messageDateAfter: '2016-07-06'};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.requestUrl));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.RequestUrl);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate>" => "2009-07-06",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->request_url;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :"message_date>" => "2009-07-06",
  :log => "1"}).each do |notification|
  puts notification.request_url
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(log: 1);

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.RequestUrl);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array("messageDate" => "2009-07-06", "log" => "1")
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->requestUrl;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(after=date(2009, 7, 6), log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date_after: Time.new('2009-07-06'),
  log: '1'
).each do |notification|
  puts notification.request_url
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate>", "2009-07-06");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date_after=date(2009, 7, 6), log="1")

for notification in notifications:
    print(notification.request_url)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.google.common.collect.Range;
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(Range.atLeast(LocalDate.parse("2009-07-06")))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate>=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate>=2009-07-06" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.notifications.list({ "messageDate>": "2009-07-06",
    "messageDate<": "2009-07-08",
    log: "1" }, function(err, data) {
    data.notifications.forEach(function(notification) {
        console.log(notification.RequestUrl);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const filterOpts = {
  messageDateAfter: '2016-07-06',
  messageDateBefore: '2016-07-08',
  log: '1',
};

client.notifications
  .each(filterOpts, (notification) => console.log(notification.requestUrl));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var notifications = twilio.ListNotifications(1, null, null, null);
    
    foreach (var notification in notifications.Notifications)
    {
      Console.WriteLine(notification.RequestUrl);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of notifications and echo a property for each one
foreach ($client->account->notifications->getIterator(0, 50, array(
        "MessageDate>" => "2009-07-06",
    "MessageDate<" => "2009-07-08",
    "Log" => "1"
    )) as $notification
) {
    echo $notification->request_url;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over notifications and print out a property for each one
@client.account.notifications.list({
  :"message_date>" => "2009-07-06",
  :"message_date<" => "2009-07-08",
  :log => "1"}).each do |notification|
  puts notification.request_url
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var notifications = NotificationResource.Read(log: 1);

        foreach (var notification in notifications)
        {
            Console.WriteLine(notification.RequestUrl);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$notifications = $client->account->notifications->read(
    array(
        "messagedateAfter" => "2009-07-06",
        "messagedateBefore" => "2009-07-08",
        "log" => "1"
    )
);
// Loop over the list of notifications and echo a property for each one
foreach ($notifications as $notification) {
    echo $notification->requestUrl;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications.list(after=date(2009, 7, 6),
    before=date(2009, 7, 8),
    log="1")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.notifications.list(
  message_date_after: Time.new('2009-07-06'),
  message_date_before: Time.new('2009-07-08'),
  log: '1'
).each do |notification|
  puts notification.request_url
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Notification;
import com.twilio.sdk.resource.list.NotificationList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the NotificationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("MessageDate>", "2009-07-06");
    params.put("MessageDate<", "2009-07-08");
    params.put("Log", "1");
    
    NotificationList notifications = client.getAccount().getNotifications(params);
    
    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of notification objects with the properties described above
notifications = client.notifications \
                      .list(message_date_after=date(2009, 7, 6),
                            message_date_before=date(2009, 7, 8),
                            log="1")

for notification in notifications:
    print(notification.request_url)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.DateTime;

import com.google.common.collect.Range;
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Notification;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    DateTime lower = DateTime.parse("2009-07-06");
    DateTime higher = DateTime.parse("2009-07-08");

    ResourceSet<Notification> notifications = Notification.reader()
        .setMessageDate(Range.closed(lower, higher))
        .setLog(1)
        .read();

    // Loop over notifications and print out a property for each one.
    for (Notification notification : notifications) {
      System.out.println(notification.getRequestUrl());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \
    -d "MessageDate>=2009-07-06" \
    -d "MessageDate<=2009-07-08" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications.json \
    -d "MessageDate>=2009-07-06" \
    -d "MessageDate<=2009-07-08" \
    -d "Log=1" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'