REST API: Application

Application インスタンス リソースは、ユーザーが Twilio で作成したアプリケーションを表現します。 Twilio 内部のアプリケーションは、ユーザーの Twilio 番号に通話や SMS が着信した時に Twilio がどのように振る舞うかを指示するための、URL とその他のコンフィグレーション データのセットです。 このコンフィグレーション データは、IncomingPhoneNumber リソースのコンフィグレーション データと同じです。つまり、VoiceUrl、VoiceMethod、VoiceFallbackUrl、VoiceFallbackMethod、StatusCallback、 StatusCallbackMethod、VoiceCallerIdLookup、SmsUrl、SmsMethod、SmsFallbackUrl、SmsFallbackMethod、SmsStatusCallback がこれに当たります。

Application のリスト リソースは、あるアカウントの Twilio アプリケーションのセットを表現します。 新しいアプリケーションを作成するには、このリスト リソースに POST します。アカウントには最大 1000 個のアプリケーションを作成できます。

アプリケーションは、複数の電話番号にまたがって使用するコンフィグレーション情報をカプセル化する際に使えます。 ApplicationSid を IncomingPhoneNumber に割り当てることで、Twilio に対して、IncomingPhoneNumber に設定された URL の代わりに、アプリケーションの URL を使用するよう指示できます。 アプリケーションを作成し、VoiceUrl をhttp://myapp.com/answer にセットします。このアプリケーションをすべての自分の電話番号に割り当てると、通話が着信するたびに、Twilio は この URL へリクエストを送信します。

Application のインスタンス リソース

リソース URI

/2010-04-01/Accounts/{AccountSid}/Applications/{ApplicationSid}

リソースのプロパティ

プロパティ 説明
Sid このリソースを一意に識別する 34 文字の文字列です。
DateCreated このリソースが生成された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
DateUpdated このリソースが最後に更新された日付の GMT 表記です。RFC 2822フォーマットを使用します。
FriendlyName このリソースの、人間が読みやすい形式の説明です。64 文字まで設定できます。
AccountSid このアプリケーションを作成した Account のユニーク ID です。
ApiVersion このアプリケーションへのリクエストが送信されると、この API バージョンを使って新しい TwiML セッションを開始します。
VoiceUrl このアプリケーションに割り当てられた電話番号への通話を受けた時に、Twilio がリクエストを送信する URL です。
VoiceMethod 上述の Url へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
VoiceFallbackUrl VoiceUrl でリクエストされた TwiML の取得または実行時にエラーが発生した場合、Twilio がリクエストを送信する Url です。
VoiceFallbackMethod VoiceFallbackUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
StatusCallback ステータス パラメーター (通話の終了など) をアプリケーションへ渡すために、Twilio がリクエストを送信する URL です。
StatusCallbackMethod StatusCallback URL へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
VoiceCallerIdLookup 発信者の発信者 ID 名を、CNAM データベースから検索します (追加料金が発生します)。true または false のいずれかです。
SmsUrl このアプリケーションに割り当てられた番号への着信 SMS メッセージを受信した時に、Twilio がリクエストを送信する URL です。
SmsMethod SmsUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
SmsFallbackUrl SmsUrl から TwiML の取得または実行時にエラーが発生した場合、Twilio がリクエストを送信する URL です。
SmsFallbackMethod 上述の URL へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
SmsStatusCallback このアプリケーションのSidがSMS送信リクエストで特定された場合、/SMS/Messagesエンドポイントにメッセージが送信された時、TwilioがPOSTするURL。
MessageStatusCallback /Messagesエンドポイントを使い、メッセージ送信、アプリケーションのSidをSMS送信リクエストの際ApplicationSidとして特定した場合、TwilioはPOSTリクエストをこのURLにステータスパラメーター(Sentもしくはfailed)を渡すために発行します。
Uri このリソースの URI です。https://api.twilio.com からの相対パスです。

HTTP GET

Application インスタンスリソースの取得
  • C#
  • curl
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
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 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 app = ApplicationResource.Fetch("AP2a0747eba6abf96b7e3c3ff0b4530f6e");

        Console.WriteLine(app.SmsUrl);
    }
}
<?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);

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

echo $app->smsUrl;
# 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)

app = client.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
print(app.sms_url)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@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
@app = @client.account.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

puts @app.sms_url
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;

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
    Application app = client.getAccount().getApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    System.out.println(app.getSmsUrl());
    
  }
}
# 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)

app = client.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
            .fetch()

print(app.sms_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e')
  .fetch()
  .then((app) => console.log(app.smsUrl));
// 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 app = twilio.GetApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    
    Console.WriteLine(app.SmsUrl);
  }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client->account->applications->get("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
echo $app->sms_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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@app = @client.account.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
puts @app.sms_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Application;

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
    Application app = Application.fetcher("AP2a0747eba6abf96b7e3c3ff0b4530f6e").fetch();

    System.out.println(app.getSmsUrl());
  }
}
// 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.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e").get(function(err, app) {
    console.log(app.smsUrl);
});
出力を表示
  • JSON
  • XML
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:00:23 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:00:23 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": null,
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>POST</VoiceMethod>
		<VoiceFallbackUrl/>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<SmsUrl/>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl/>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</TwilioResponse>
Application インスタンスリソースの取得

HTTP POST

アプリケーションのプロパティを更新します。更新に成功すると、更新されたリソース表現を返します。 返却されるレスポンスは、GET リクエストを送信した場合と同じです。

オプションパラメーター

次のパラメーターの 1 つまたは複数を指定して、このアプリケーションのプロパティを更新できます。

パラメーター 説明
FriendlyName このアプリケーションの、人間が読みやすい形式の説明です。64 文字まで設定できます。
ApiVersion このアプリケーションの URL へのリクエストが送信されると、この API バージョンを使って新しい TwiML セッションを開始します。2010-04-01 または 2008-08-01のいずれかです。
VoiceUrl このアプリケーションに割り当てられた番号がダイヤルされた時に、Twilio がリクエストを送信する URL です。
VoiceMethod VoiceUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
VoiceFallbackUrl 上述の VoiceUrl で指定された TwiML のリクエストまたは実行時にエラーが発生した場合、Twilio がリクエストを送信する URL です。
VoiceFallbackMethod VoiceFallbackUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
StatusCallback ステータス パラメーター (通話の終了など) をアプリケーションへ渡すために、Twilio がリクエストを送信する URL です。
StatusCallbackMethod StatusCallback URL へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
VoiceCallerIdLookup 発信者の名前を CNAM データベースから検索し、アプリケーションへ通知します。true または false のいずれかです。
SmsUrl このアプリケーションに割り当てられた番号宛に SMS が送信された時に、Twilio がリクエストを送信する URL です。
SmsMethod SmsUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
SmsFallbackUrl 上述の SmsUrl で指定された TwiML のリクエストまたは実行時にエラーが発生した場合、Twilio がリクエストを送信する URL です。
SmsFallbackMethod SmsFallbackUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。
SmsStatusCallback このアプリケーションのSidがSMS送信リクエストで特定された場合、/SMS/Messagesエンドポイントにメッセージが送信された時、TwilioがPOSTするURL。
MessageStatusCallback /Messagesエンドポイントを使い、メッセージ送信、アプリケーションのSidをSMS送信リクエストの際ApplicationSidとして特定した場合、TwilioはPOSTリクエストをこのURLにステータスパラメーター(Sentもしくはfailed)を渡すために発行します。
例 1

アプリケーションの VoiceUrl と SmsUrl を 'http://myapp.com/awesome' に設定します。

VoiceUrl と SmsUrl をアプリケーションに設定
  • C#
  • curl
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
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 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);

        ApplicationResource.Update(
            "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
            voiceUrl: new Uri("http://demo.twilio.com/docs/voice.xml"),
            smsUrl: new Uri("http://demo.twilio.com/docs/sms.xml"));
    }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client
    ->applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->update(
        array(
            "voiceUrl" => "http://demo.twilio.com/docs/voice.xml",
            "smsUrl" => "http://demo.twilio.com/docs/sms.xml"
        )
    );

echo $app->voiceUrl;
# 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)

app = client.applications.update("AP2a0747eba6abf96b7e3c3ff0b4530f6e", voice_url="http://demo.twilio.com/docs/voice.xml",
    sms_url="http://demo.twilio.com/docs/sms.xml")
print(app.voice_url)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@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
@app = @client.account.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

voice_url = 'http://demo.twilio.com/docs/voice.xml'
sms_url = 'http://demo.twilio.com/docs/sms.xml'

@app.update(voice_url: voice_url, sms_url: sms_url)

puts @app.voice_url
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "SmsUrl=http://demo.twilio.com/docs/sms.xml" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "SmsUrl=http://demo.twilio.com/docs/sms.xml" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

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
    Application app = client.getAccount().getApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    // Build a filter for the ApplicationList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("VoiceUrl", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("SmsUrl", "http://demo.twilio.com/docs/sms.xml"));
    app.update(params);
    
  }
}
# 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)

app = client.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
            .update(voice_url="http://demo.twilio.com/docs/voice.xml",
                    sms_url="http://demo.twilio.com/docs/sms.xml")

print(app.voice_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e')
  .update({
    voiceUrl: 'http://demo.twilio.com/docs/voice.xml',
    smsUrl: 'http://demo.twilio.com/docs/sms.xml',
  })
  .then((app) => console.log(app.voiceUrl));
// 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 options = new ApplicationOptions();
    options.VoiceUrl = "http://demo.twilio.com/docs/voice.xml";
    options.SmsUrl = "http://demo.twilio.com/docs/sms.xml";

    twilio.UpdateApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e", null, options);
  }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client->account->applications->get("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
$app->update(array(
        "VoiceUrl" => "http://demo.twilio.com/docs/voice.xml",
    "SmsUrl" => "http://demo.twilio.com/docs/sms.xml"
    ));
echo $app->voice_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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@app = @client.account.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
@app.update(:voice_url => "http://demo.twilio.com/docs/voice.xml",
            :sms_url => "http://demo.twilio.com/docs/sms.xml")
puts @app.voice_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Application;

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
    Application app = Application.updater("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
        .setVoiceUrl("http://demo.twilio.com/docs/voice.xml")
        .setSmsUrl("http://demo.twilio.com/docs/sms.xml").update();

    System.out.println(app.getDateUpdated());
  }
}
// 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.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e").update({
    voiceUrl: "http://demo.twilio.com/docs/voice.xml",
    smsUrl: "http://demo.twilio.com/docs/sms.xml"
}, function(err, app) {
    console.log(app.voiceUrl);
});
出力を表示
  • JSON
  • XML
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:00:23 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:00:23 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": "http://demo.twilio.com/docs/sms.xml",
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>POST</VoiceMethod>
		<VoiceFallbackUrl/>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<SmsUrl>http://demo.twilio.com/docs/sms.xml</SmsUrl>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl/>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</TwilioResponse>
VoiceUrl と SmsUrl をアプリケーションに設定

HTTP PUT

サポートしません。

HTTP DELETE

このアプリケーションを削除します。 IncoimngPhoneNumber リソースに、このアプリケーションの sid を VoiceApplicationSid または SmsApplicatonSid として割り当てている場合、このアプリケーションの sid は削除されます。

削除に成功すると、ボディーのない HTTP 204 レスポンスを返します。

Applications リスト リソース

リソース URI

/2010-04-01/Accounts/{AccountSid}/Applications

HTTP GET

Application リソース表現のリストを返します。各項目は、アカウント内のアプリケーションを表現します。 このリストは ページ情報を含みます。

リスト フィルター

次のクエリ パラメーターを使って、返却されるリストに制限を加えます。 パラメーターの大文字と小文字は区別されます。

パラメーター 説明
FriendlyName この名前と FriendlyName が一致する Application リソースのみを返します。
例 1
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 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 apps = ApplicationResource.Read();

        foreach (var app in apps)
        {
            Console.WriteLine(app.SmsUrl);
        }
    }
}
<?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);

// Loop over the list of apps and echo a property for each one
foreach ($client->applications->read() as $app) {
    echo $app->smsUrl;
}
# 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 app objects with the properties described above
apps = client.applications.list()
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over apps and print out a property for each one
@client.account.applications.list.each do |app|
    puts app.sms_url
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;

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);

    
    
    ApplicationList apps = client.getAccount().getApplications();
    
    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getSmsUrl());
    }
    
  }
}
# 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 app objects with the properties described above
for app in client.applications.list():
    print(app.sms_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications.each((app) => console.log(app.smsUrl));
// 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 apps = twilio.ListApplications(null, null, null);
    
    foreach (var app in apps.Applications)
    {
      Console.WriteLine(app.SmsUrl);
    }
  }
}
<?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 apps and echo a property for each one
foreach ($client->account->applications as $app) {
    echo $app->sms_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 apps and print out a property for each one
@client.account.applications.list.each do |app|
  puts app.sms_url
end
// 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.Application;

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<Application> apps = Application.reader().read();

    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getSmsUrl());
    }
  }
}
// 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.applications.list(function(err, data) {
    data.applications.forEach(function(app) {
        console.log(app.SmsUrl);
    });
});
出力を表示
  • JSON
  • XML
{
	"page": 0,
	"page_size": 50,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications.json",
	"first_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications.json?Page=0&PageSize=50",
	"previous_page_uri": null,
	"next_page_uri": null,
	"applications": [
		{
			"sid": "AP3f94c94562ac88dccf16f8859a1a8b25",
			"date_created": "Thu, 13 Nov 2008 07:56:24 +0000",
			"date_updated": "Thu, 13 Nov 2008 08:45:58 +0000",
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"friendly_name": "Long Play",
			"api_version": "2010-04-01",
			"voice_url": "http:\/\/demo.twilio.com\/docs/voice.xml",
			"voice_method": "GET",
			"voice_fallback_url": null,
			"voice_fallback_method": null,
			"status_callback": null,
			"status_callback_method": null,
			"voice_caller_id_lookup": null,
			"sms_url": null,
			"sms_method": null,
			"sms_fallback_url": null,
			"sms_fallback_method": null,
			"sms_status_callback": null,
			"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP3f94c94562ac88dccf16f8859a1a8b25.json"
		},
		...
	]
}
<TwilioResponse>
	<Applications page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Application>
			<Sid>AP3f94c94562ac88dccf16f8859a1a8b25</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Long Play</FriendlyName>
			<ApiVersion>2010-04-01</ApiVersion>
			<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
			<VoiceMethod>GET</VoiceMethod>
			<VoiceFallbackUrl/>
			<VoiceFallbackMethod/>
			<StatusCallback/>
			<StatusCallbackMethod/>
			<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
			<SmsUrl/>
			<SmsMethod/>
			<SmsFallbackUrl/>
			<SmsFallbackMethod/>
			<SmsStatusCallback/>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Application>
		...
	</Applications>
</TwilioResponse>
すべての Application リソース表現のリストの取得
例 2

「MyApp」という名前のアプリケーションを返します。

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 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 apps = ApplicationResource.Read(friendlyName: "MyApp");

        foreach (var app in apps)
        {
            Console.WriteLine(app.VoiceUrl);
        }
    }
}
<?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);

$applications = $client->applications->read(
    array("friendlyName" => "MyApp")
);
// Loop over the list of apps and echo a property for each one
foreach ($applications as $app) {
    echo $app->voiceUrl;
}
# 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 app objects with the properties described above
apps = client.applications.list(friendly_name="MyApp")
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

apps = @client.account.applications.list(friendly_name: 'MyApp')

# Loop over apps and print out the voice_url property for each one
apps.each do |app|
  puts app.voice_url
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -d "FriendlyName=MyApp" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -d "FriendlyName=MyApp" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;
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 ApplicationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("FriendlyName", "MyApp");
    
    ApplicationList apps = client.getAccount().getApplications(params);
    
    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getVoiceUrl());
    }
    
  }
}
# 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 app objects with the properties described above
for app in client.applications.list(friendly_name="MyApp"):
    print(app.voice_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications
  .each({friendlyName: 'MyApp'}, (app) => console.log(app.VoiceUrl));
// 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 apps = twilio.ListApplications("MyApp", null, null);
    
    foreach (var app in apps.Applications)
    {
      Console.WriteLine(app.VoiceUrl);
    }
  }
}
<?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 apps and echo a property for each one
foreach ($client->account->applications->getIterator(0, 50, array(
        "FriendlyName" => "MyApp"
    )) as $app
) {
    echo $app->voice_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 apps and print out a property for each one
@client.account.applications.list({
  :friendly_name => "MyApp"}).each do |app|
  puts app.voice_url
end
// 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.Application;

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<Application> apps = Application.reader().setFriendlyName("MyApp").read();

    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getVoiceUrl());
    }
  }
}
// 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.applications.list({ friendlyName: "MyApp" }, function(err, data) {
    data.applications.forEach(function(app) {
        console.log(app.VoiceUrl);
    });
});
「MyApp」という名前のアプリケーションを返す

HTTP POST

アカウント内で新しいアプリケーションを作成します。

必要なパラメーター

リクエストには、次のパラメーターを含める 必要があります

パラメーター 説明
FriendlyName 新しいアプリケーションの、人間が読みやすい形式の説明です。 64 文字まで設定できます。
オプションパラメーター

リクエストには、次のパラメーターを含めることができます。

パラメーター 説明
ApiVersion このアプリケーションの URL へのリクエストが送信されると、この API バージョンを使って新しい TwiML セッションを開始します。2010-04-01 または 2008-08-01のいずれかです。 初期値は、このアカウントのデフォルト API バージョンです。
VoiceUrl このアプリケーションに割り当てられた番号がダイヤルされた時に、Twilio がリクエストを送信する URL です。
VoiceMethod VoiceUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。 必ず GET または POST のいずれかとします。 初期値は POST です。
VoiceFallbackUrl 上述の Url の TwiML のリクエストまたは実行時にエラーが発生した場合、Twilio がリクエストを送信する URL です。
VoiceFallbackMethod VoiceFallbackUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。 初期値は POST です。
StatusCallback ステータス パラメーター (通話の終了など) をアプリケーションへ渡すために、Twilio がリクエストを送信する URL です。
StatusCallbackMethod StatusCallback URL へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。GET または POST のいずれかです。 初期値は POST です。
VoiceCallerIdLookup 発信者の名前を CNAM データベースから検索し、アプリケーションへ通知します。true または false のいずれかです。 初期値は false です。
SmsUrl このアプリケーションに割り当てられた番号宛に SMS が送信された時に、Twilio がリクエストを送信する URL です。
SmsMethod SmsUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。 必ず GET または POST のいずれかとします。 初期値は POST です。
SmsFallbackUrl 上述の SmsUrl で指定された TwiML のリクエストまたは実行時にエラーが発生した場合、Twilio がリクエストを送信する URL です。
SmsFallbackMethod SmsFallbackUrl へリクエストを送信する際に、Twilio が使用する HTTP のメソッドです。 必ず GET または POST のいずれかとします。 初期値は POST です。
SmsStatusCallback このアプリケーションのSidをSMS送信リクエストの際ApplicationSidとして特定した場合、TwilioはPOSTリクエストをこのURLにステータスパラメーター(Sentもしくはfailed)を渡すために発行します。
MessageStatusCallback /Messagesエンドポイントを使い、メッセージ送信、アプリケーションのSidをSMS送信リクエストの際ApplicationSidとして特定した場合、TwilioはPOSTリクエストをこのURLにステータスパラメーター(Sentもしくはfailed)を渡すために発行します。

リクエストが成功すると、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
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
using Twilio.Http;

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 app = ApplicationResource.Create(
            "Phone Me",
            voiceUrl: new Uri("http://demo.twilio.com/docs/voice.xml"),
            voiceMethod: HttpMethod.Get);

        Console.WriteLine(app.Sid);
    }
}
<?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);

$app = $client->applications->create(
    "Phone Me",
    array(
        "voiceUrl" => "http://demo.twilio.com/docs/voice.xml",
        "voiceMethod" => "GET"
    )
);

echo $app->sid;
# 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)

app = client.applications.create(friendly_name="Phone Me",
    voice_url="http://demo.twilio.com/docs/voice.xml",
    voice_method="GET")
print(app.sid)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

app = @client.api.v2010.accounts(account_sid).applications.create(
  friendly_name: 'Phone Me',
  voice_url: 'http://demo.twilio.com/docs/voice.xml',
  voice_method: 'GET'
)

puts app.voice_url
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -d "FriendlyName=Phone%20Me" \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -d "FriendlyName=Phone%20Me" \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.factory.ApplicationFactory;
import com.twilio.sdk.resource.instance.Application;
import com.twilio.sdk.resource.list.ApplicationList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

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 ApplicationList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Phone Me"));
    params.add(new BasicNameValuePair("VoiceUrl", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    
    
    ApplicationFactory appFactory = client.getAccount().getApplicationFactory();
    Application app = appFactory.create(params);
    System.out.println(app.getSid());
  }
}
# 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)

app = client.applications.create(friendly_name="Phone Me",
        voice_url="http://demo.twilio.com/docs/voice.xml",
        voice_method="GET")

print(app.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications.create({
  friendlyName: 'Phone Me',
  voiceUrl: 'http://demo.twilio.com/docs/voice.xml',
  voiceMethod: 'GET',
})
.then((app) => process.stdout.write(app.sid));
// 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 options = new ApplicationOptions();
    options.VoiceUrl = "http://demo.twilio.com/docs/voice.xml";
    options.VoiceMethod = "GET";
    var app = twilio.AddApplication("Phone Me", options);

    Console.WriteLine(app.Sid);
  }
}
<?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);

$app = $client->account->applications->create("Phone Me", array(
        "VoiceUrl" => "http://demo.twilio.com/docs/voice.xml",
    "VoiceMethod" => "GET"
    ));
echo $app->sid;
# 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

app = @client.account.applications.create(:friendly_name => "Phone Me",
                                          :voice_url => "http://demo.twilio.com/docs/voice.xml",
                                          :voice_method => "GET")
puts app.voice_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.Application;

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);

    Application app =
        Application.creator("Phone Me").setVoiceUrl("http://demo.twilio.com/docs/voice.xml")
            .setVoiceMethod(HttpMethod.GET).create();

    System.out.println(app.getSid());
  }
}
// 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.applications.create({
    friendlyName: "Phone Me",
    voiceUrl: "http://demo.twilio.com/docs/voice.xml",
    voiceMethod: "GET"
}, function(err, app) {
    process.stdout.write(app.sid);
});
出力を表示
  • JSON
  • XML
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:31:47 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:31:47 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": null,
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>GET</VoiceMethod>
		<VoiceFallbackUrl></VoiceFallbackUrl>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<SmsUrl></SmsUrl>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl></SmsFallbackUrl>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</TwilioResponse>
アカウント内で新しいアプリケーションを作成

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

1 / 1
Loading Code Samples...
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 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 app = ApplicationResource.Fetch("AP2a0747eba6abf96b7e3c3ff0b4530f6e");

        Console.WriteLine(app.SmsUrl);
    }
}
<?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);

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

echo $app->smsUrl;
# 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)

app = client.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
print(app.sms_url)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@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
@app = @client.account.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

puts @app.sms_url
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;

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
    Application app = client.getAccount().getApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    System.out.println(app.getSmsUrl());
    
  }
}
# 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)

app = client.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
            .fetch()

print(app.sms_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e')
  .fetch()
  .then((app) => console.log(app.smsUrl));
// 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 app = twilio.GetApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    
    Console.WriteLine(app.SmsUrl);
  }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client->account->applications->get("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
echo $app->sms_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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@app = @client.account.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
puts @app.sms_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Application;

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
    Application app = Application.fetcher("AP2a0747eba6abf96b7e3c3ff0b4530f6e").fetch();

    System.out.println(app.getSmsUrl());
  }
}
// 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.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e").get(function(err, app) {
    console.log(app.smsUrl);
});
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:00:23 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:00:23 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": null,
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>POST</VoiceMethod>
		<VoiceFallbackUrl/>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<SmsUrl/>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl/>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</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
形式:
  • JSON
  • XML
// 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);

        ApplicationResource.Update(
            "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
            voiceUrl: new Uri("http://demo.twilio.com/docs/voice.xml"),
            smsUrl: new Uri("http://demo.twilio.com/docs/sms.xml"));
    }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client
    ->applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->update(
        array(
            "voiceUrl" => "http://demo.twilio.com/docs/voice.xml",
            "smsUrl" => "http://demo.twilio.com/docs/sms.xml"
        )
    );

echo $app->voiceUrl;
# 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)

app = client.applications.update("AP2a0747eba6abf96b7e3c3ff0b4530f6e", voice_url="http://demo.twilio.com/docs/voice.xml",
    sms_url="http://demo.twilio.com/docs/sms.xml")
print(app.voice_url)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@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
@app = @client.account.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

voice_url = 'http://demo.twilio.com/docs/voice.xml'
sms_url = 'http://demo.twilio.com/docs/sms.xml'

@app.update(voice_url: voice_url, sms_url: sms_url)

puts @app.voice_url
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "SmsUrl=http://demo.twilio.com/docs/sms.xml" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "SmsUrl=http://demo.twilio.com/docs/sms.xml" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

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
    Application app = client.getAccount().getApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
    // Build a filter for the ApplicationList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("VoiceUrl", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("SmsUrl", "http://demo.twilio.com/docs/sms.xml"));
    app.update(params);
    
  }
}
# 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)

app = client.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
            .update(voice_url="http://demo.twilio.com/docs/voice.xml",
                    sms_url="http://demo.twilio.com/docs/sms.xml")

print(app.voice_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications('AP2a0747eba6abf96b7e3c3ff0b4530f6e')
  .update({
    voiceUrl: 'http://demo.twilio.com/docs/voice.xml',
    smsUrl: 'http://demo.twilio.com/docs/sms.xml',
  })
  .then((app) => console.log(app.voiceUrl));
// 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 options = new ApplicationOptions();
    options.VoiceUrl = "http://demo.twilio.com/docs/voice.xml";
    options.SmsUrl = "http://demo.twilio.com/docs/sms.xml";

    twilio.UpdateApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e", null, options);
  }
}
<?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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$app = $client->account->applications->get("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
$app->update(array(
        "VoiceUrl" => "http://demo.twilio.com/docs/voice.xml",
    "SmsUrl" => "http://demo.twilio.com/docs/sms.xml"
    ));
echo $app->voice_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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@app = @client.account.applications.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
@app.update(:voice_url => "http://demo.twilio.com/docs/voice.xml",
            :sms_url => "http://demo.twilio.com/docs/sms.xml")
puts @app.voice_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Application;

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
    Application app = Application.updater("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
        .setVoiceUrl("http://demo.twilio.com/docs/voice.xml")
        .setSmsUrl("http://demo.twilio.com/docs/sms.xml").update();

    System.out.println(app.getDateUpdated());
  }
}
// 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.applications("AP2a0747eba6abf96b7e3c3ff0b4530f6e").update({
    voiceUrl: "http://demo.twilio.com/docs/voice.xml",
    smsUrl: "http://demo.twilio.com/docs/sms.xml"
}, function(err, app) {
    console.log(app.voiceUrl);
});
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:00:23 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:00:23 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": "http://demo.twilio.com/docs/sms.xml",
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>POST</VoiceMethod>
		<VoiceFallbackUrl/>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<SmsUrl>http://demo.twilio.com/docs/sms.xml</SmsUrl>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl/>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</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
形式:
  • JSON
  • XML
// 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 apps = ApplicationResource.Read();

        foreach (var app in apps)
        {
            Console.WriteLine(app.SmsUrl);
        }
    }
}
<?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);

// Loop over the list of apps and echo a property for each one
foreach ($client->applications->read() as $app) {
    echo $app->smsUrl;
}
# 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 app objects with the properties described above
apps = client.applications.list()
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over apps and print out a property for each one
@client.account.applications.list.each do |app|
    puts app.sms_url
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;

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);

    
    
    ApplicationList apps = client.getAccount().getApplications();
    
    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getSmsUrl());
    }
    
  }
}
# 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 app objects with the properties described above
for app in client.applications.list():
    print(app.sms_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications.each((app) => console.log(app.smsUrl));
// 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 apps = twilio.ListApplications(null, null, null);
    
    foreach (var app in apps.Applications)
    {
      Console.WriteLine(app.SmsUrl);
    }
  }
}
<?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 apps and echo a property for each one
foreach ($client->account->applications as $app) {
    echo $app->sms_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 apps and print out a property for each one
@client.account.applications.list.each do |app|
  puts app.sms_url
end
// 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.Application;

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<Application> apps = Application.reader().read();

    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getSmsUrl());
    }
  }
}
// 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.applications.list(function(err, data) {
    data.applications.forEach(function(app) {
        console.log(app.SmsUrl);
    });
});
{
	"page": 0,
	"page_size": 50,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications.json",
	"first_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications.json?Page=0&PageSize=50",
	"previous_page_uri": null,
	"next_page_uri": null,
	"applications": [
		{
			"sid": "AP3f94c94562ac88dccf16f8859a1a8b25",
			"date_created": "Thu, 13 Nov 2008 07:56:24 +0000",
			"date_updated": "Thu, 13 Nov 2008 08:45:58 +0000",
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"friendly_name": "Long Play",
			"api_version": "2010-04-01",
			"voice_url": "http:\/\/demo.twilio.com\/docs/voice.xml",
			"voice_method": "GET",
			"voice_fallback_url": null,
			"voice_fallback_method": null,
			"status_callback": null,
			"status_callback_method": null,
			"voice_caller_id_lookup": null,
			"sms_url": null,
			"sms_method": null,
			"sms_fallback_url": null,
			"sms_fallback_method": null,
			"sms_status_callback": null,
			"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP3f94c94562ac88dccf16f8859a1a8b25.json"
		},
		...
	]
}
<TwilioResponse>
	<Applications page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Application>
			<Sid>AP3f94c94562ac88dccf16f8859a1a8b25</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Long Play</FriendlyName>
			<ApiVersion>2010-04-01</ApiVersion>
			<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
			<VoiceMethod>GET</VoiceMethod>
			<VoiceFallbackUrl/>
			<VoiceFallbackMethod/>
			<StatusCallback/>
			<StatusCallbackMethod/>
			<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
			<SmsUrl/>
			<SmsMethod/>
			<SmsFallbackUrl/>
			<SmsFallbackMethod/>
			<SmsStatusCallback/>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Application>
		...
	</Applications>
</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 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 apps = ApplicationResource.Read(friendlyName: "MyApp");

        foreach (var app in apps)
        {
            Console.WriteLine(app.VoiceUrl);
        }
    }
}
<?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);

$applications = $client->applications->read(
    array("friendlyName" => "MyApp")
);
// Loop over the list of apps and echo a property for each one
foreach ($applications as $app) {
    echo $app->voiceUrl;
}
# 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 app objects with the properties described above
apps = client.applications.list(friendly_name="MyApp")
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

apps = @client.account.applications.list(friendly_name: 'MyApp')

# Loop over apps and print out the voice_url property for each one
apps.each do |app|
  puts app.voice_url
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -d "FriendlyName=MyApp" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -d "FriendlyName=MyApp" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.Application;
import com.twilio.sdk.resource.list.ApplicationList;
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 ApplicationList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("FriendlyName", "MyApp");
    
    ApplicationList apps = client.getAccount().getApplications(params);
    
    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getVoiceUrl());
    }
    
  }
}
# 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 app objects with the properties described above
for app in client.applications.list(friendly_name="MyApp"):
    print(app.voice_url)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications
  .each({friendlyName: 'MyApp'}, (app) => console.log(app.VoiceUrl));
// 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 apps = twilio.ListApplications("MyApp", null, null);
    
    foreach (var app in apps.Applications)
    {
      Console.WriteLine(app.VoiceUrl);
    }
  }
}
<?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 apps and echo a property for each one
foreach ($client->account->applications->getIterator(0, 50, array(
        "FriendlyName" => "MyApp"
    )) as $app
) {
    echo $app->voice_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 apps and print out a property for each one
@client.account.applications.list({
  :friendly_name => "MyApp"}).each do |app|
  puts app.voice_url
end
// 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.Application;

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<Application> apps = Application.reader().setFriendlyName("MyApp").read();

    // Loop over apps and print out a property for each one.
    for (Application app : apps) {
      System.out.println(app.getVoiceUrl());
    }
  }
}
// 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.applications.list({ friendlyName: "MyApp" }, function(err, data) {
    data.applications.forEach(function(app) {
        console.log(app.VoiceUrl);
    });
});
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 twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
using Twilio.Http;

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 app = ApplicationResource.Create(
            "Phone Me",
            voiceUrl: new Uri("http://demo.twilio.com/docs/voice.xml"),
            voiceMethod: HttpMethod.Get);

        Console.WriteLine(app.Sid);
    }
}
<?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);

$app = $client->applications->create(
    "Phone Me",
    array(
        "voiceUrl" => "http://demo.twilio.com/docs/voice.xml",
        "voiceMethod" => "GET"
    )
);

echo $app->sid;
# 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)

app = client.applications.create(friendly_name="Phone Me",
    voice_url="http://demo.twilio.com/docs/voice.xml",
    voice_method="GET")
print(app.sid)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

app = @client.api.v2010.accounts(account_sid).applications.create(
  friendly_name: 'Phone Me',
  voice_url: 'http://demo.twilio.com/docs/voice.xml',
  voice_method: 'GET'
)

puts app.voice_url
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications.json \
    -d "FriendlyName=Phone%20Me" \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications \
    -d "FriendlyName=Phone%20Me" \
    -d "VoiceUrl=http://demo.twilio.com/docs/voice.xml" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// 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.factory.ApplicationFactory;
import com.twilio.sdk.resource.instance.Application;
import com.twilio.sdk.resource.list.ApplicationList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

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 ApplicationList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Phone Me"));
    params.add(new BasicNameValuePair("VoiceUrl", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    
    
    ApplicationFactory appFactory = client.getAccount().getApplicationFactory();
    Application app = appFactory.create(params);
    System.out.println(app.getSid());
  }
}
# 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)

app = client.applications.create(friendly_name="Phone Me",
        voice_url="http://demo.twilio.com/docs/voice.xml",
        voice_method="GET")

print(app.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers 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.applications.create({
  friendlyName: 'Phone Me',
  voiceUrl: 'http://demo.twilio.com/docs/voice.xml',
  voiceMethod: 'GET',
})
.then((app) => process.stdout.write(app.sid));
// 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 options = new ApplicationOptions();
    options.VoiceUrl = "http://demo.twilio.com/docs/voice.xml";
    options.VoiceMethod = "GET";
    var app = twilio.AddApplication("Phone Me", options);

    Console.WriteLine(app.Sid);
  }
}
<?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);

$app = $client->account->applications->create("Phone Me", array(
        "VoiceUrl" => "http://demo.twilio.com/docs/voice.xml",
    "VoiceMethod" => "GET"
    ));
echo $app->sid;
# 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

app = @client.account.applications.create(:friendly_name => "Phone Me",
                                          :voice_url => "http://demo.twilio.com/docs/voice.xml",
                                          :voice_method => "GET")
puts app.voice_url
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.Application;

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);

    Application app =
        Application.creator("Phone Me").setVoiceUrl("http://demo.twilio.com/docs/voice.xml")
            .setVoiceMethod(HttpMethod.GET).create();

    System.out.println(app.getSid());
  }
}
// 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.applications.create({
    friendlyName: "Phone Me",
    voiceUrl: "http://demo.twilio.com/docs/voice.xml",
    voiceMethod: "GET"
}, function(err, app) {
    process.stdout.write(app.sid);
});
{
	"sid": "AP2a0747eba6abf96b7e3c3ff0b4530f6e",
	"date_created": "Mon, 16 Aug 2010 23:31:47 +0000",
	"date_updated": "Mon, 16 Aug 2010 23:31:47 +0000",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "Phone Me",
	"api_version": "2010-04-01",
	"voice_url": "http://demo.twilio.com/docs/voice.xml",
	"voice_method": "POST",
	"voice_fallback_url": null,
	"voice_fallback_method": "POST",
	"status_callback": null,
	"status_callback_method": null,
	"voice_caller_id_lookup": null,
	"sms_url": null,
	"sms_method": "POST",
	"sms_fallback_url": null,
	"sms_fallback_method": "GET",
	"sms_status_callback": null,
	"uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/Applications\/AP2a0747eba6abf96b7e3c3ff0b4530f6e.json"
}
<TwilioResponse>
	<Application>
		<Sid>AP2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Phone Me</FriendlyName>
		<ApiVersion>2010-04-01</ApiVersion>
		<VoiceUrl>http://demo.twilio.com/docs/voice.xml</VoiceUrl>
		<VoiceMethod>GET</VoiceMethod>
		<VoiceFallbackUrl></VoiceFallbackUrl>
		<VoiceFallbackMethod>POST</VoiceFallbackMethod>
		<StatusCallback/>
		<StatusCallbackMethod/>
		<VoiceCallerIdLookup>false</VoiceCallerIdLookup>
		<SmsUrl></SmsUrl>
		<SmsMethod>POST</SmsMethod>
		<SmsFallbackUrl></SmsFallbackUrl>
		<SmsFallbackMethod>GET</SmsFallbackMethod>
		<SmsStatusCallback/>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/AP2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Application>
</TwilioResponse>