REST API: SIP ドメイン

概要

SIPドメインはあなたのアカウントのSIPトラフィックを許可するためのカスタムDNSホスト名です。“sip:alice@example.sip.twilio.com”というリクエストがこのドメインに来た場合、Twilioにルーティングします。Twilioにリクエストが到着し、認証が終了すると、TwilioはあなたのサーバーにTwiMLを要求します。SIPのVoiceUrlはTwilioにどのURLにリクエストを行うか伝えます。

TwilioはSIPドメイン用に2種類のビルトイン認証機構を用意しています。IpAccessControlListsとCredentialListsです。少なくとも一つをあなたのドメインに適用する必要があります、そうしなければリクエストはブロックされます。1つ、もしくは両方のタイプの認証をSIPドメインに適用して下さい。

IpAccessControlListMappingとSIPドメインCredentialListMappingsサブリソースはどのリストをあなたのSIPドメインにマップするかを示します。

リソースのプロパティ

ドメインインスタンスリソースは下記のプロパティを持っています。

プロパティ 説明
Sid A34文字はTwilioでのSIPドメインを表す一意な文字列です
FriendlyName 人間が読みやすい形式の説明です。64 文字まで設定できます。
AccountSid このメッセージを送信したアカウントのユニークID
ApiVersion メッセージを作成する際に使用されたTwilioのAPIバージョン
DomainName Twilioであなたが予約しているユニークなアドレスで、SIPトラフィックをルーティングしますドメイン名には文字、数字、”-“を使用できます
AuthType あなたのドメインにマップされた認証タイプ。予定される値は“IP_ACL”と“CREDENTIAL_LIST”です。両方を使用する場合、カンマ区切りで値が返されます。設定していない場合、いかなるトラフィックも遮断されます。
VoiceUrl このドメインがコールを受信した時にTwilioがリクエストするURL
VoiceMethod voice_urlをリクエストするときに使用されるメソッド。GETもしくはPOSTです
VoiceFallbackUrl VoiceUrlによってTwiMLが読み出され、実行された時にエラーが起きた場合、TwilioはこのURLを呼び出します。
VoiceFallbackMethod VoiceFallbackUrlをリクエストする時に使用されるHTTPメソッド。GETもしくはPOSTです。
VoiceStatusCallbackUrl ステータス パラメーター (通話の終了など) をアプリケーションへ渡すために、Twilio がリクエストを送信する URL です。
VoiceStatusCallbackMethod StatusCallback URLが呼び出される際に使用されるHTTPメソッド。GETもしくはPOSTです。
sipregistration このブール値を有効にすると、着信通話を行うためにこのドメインに登録するSIPエンドポイントを許可することができます。
DateCreated このリソースが生成された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
DateUpdated DateUpdated | このリソースが最後に更新された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
Uri URIリソース、右に関連する https://api.twilio.com

SIPドメインリストリソース

このリストリソースはドメインを新たに作成すること、及びアカウントのドメインを見ることができます。

リソース URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains

HTTP GET

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains

ドメインのリストが返されます。

すべてのドメインのリストを取得します。

すべてのSIPドメインを取得する
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domains = DomainResource.Read();

        foreach (var domain in domains)
        {
          Console.WriteLine(domain.DomainName);
        }
    }
}
<?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 domains and echo a property for each one
foreach ($client->sip->domains->read() as $domain) {
    echo $domain->domainName;
}
# 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 domain objects with the properties described above
domains = client.sip.domains.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Loop over domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
  puts domain.domain_name
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -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.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;

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

    
    
    DomainList domains = client.getAccount().getDomains();
    
    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
    
  }
}
# 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)

# Loop over the list of domains and print(a property for each one
for domain in client.sip.domains.list():
    print(domain.domain_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.each((domain) => {
  console.log(domain.domainName);
});
// 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 domains = twilio.ListDomains();

    foreach (var domain in domains.Domains)
    {
      Console.WriteLine(domain.DomainName);
    }
  }
}
<?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 domains and echo a property for each one
foreach ($client->account->sip->domains as $domain) {
    echo $domain->domain_name;
}
# 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 domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
    puts domain.domain_name
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.sip.Domain;

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<Domain> domains = Domain.reader().read();

    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
  }
}
// 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.sip.domains.list(function(err, data) {
    data.domains.forEach(function(domain) {
        console.log(domain.DomainName);
    });
});
出力を表示
  • JSON
  • XML
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "page_size": 50,
    "sip_domains": [
        {
            "auth_type": "",
            "voice_status_callback_method": "POST",
            "subresource_uris": {
                "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings.json",
                "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings.json"
            },
            "date_updated": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_status_callback_url": null,
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776.json",
            "friendly_name": "Scranton Office",
            "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "voice_url": "https://dundermifflin.example.com/twilio/app.php",
            "voice_method": "POST",
            "sid": "SD098e7b11c00d0ba152b1d3f084c4b776",
            "date_created": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_fallback_method": "POST",
            "api_version": "2010-04-01",
            "voice_fallback_url": null
        },
        ...
    ],
    "next_page_uri": null,
    "page": 0
}
<TwilioResponse>
    <SipDomains [paging attributes]>
        <SipDomain>
            <Sid>SD098e7b11c00d0ba152b1d3f084c4b776</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Scranton Office</FriendlyName>
            <ApiVersion>2010-04-01</ApiVersion>
            <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
            <AuthType/>
            <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
            <VoiceMethod>POST</VoiceMethod>
            <VoiceFallbackUrl/>
            <VoiceFallbackMethod>POST</VoiceFallbackMethod>
            <VoiceStatusCallbackUrl/>
            <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
            <DateCreated>Fri, 06 Sep 2013 18:48:50 -0000</DateCreated>
            <DateUpdated>Fri, 06 Sep 2013 18:48:50 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776</Uri>
            <SubresourceUris>
                <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings</CredentialListMappings>
                <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings</IpAccessControlListMappings>
            </SubresourceUris>
        </SipDomain>
        ...
    </SipDomains>
</TwilioResponse>
すべてのSIPドメインを取得する

HTTP POST

新しいドメインを作成し、そのインスタンスリソースを返します。“.sip.twilio.com”で終わる一意のドメインの選択できます。ドメイン作成後、ドメインが通信の受信準備が終わる前に認証メソッドをマップします。

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains

新しいドメインを作る為に少なくとも下記の項目をPOSTする必要があります。

パラメーター 説明
DomainName Twilioであなたが予約しているユニークなアドレスで、SIPトラフィックをルーティングしますドメイン名には文字、数字、”-“を使用できます

新しいドメインを作成時下記のパラメーターを同様に設定する必要があります。ドメイン作成時に少なくともVoiceUrlを設定することをお薦め致します。

パラメーター 説明
FriendlyName 人間が読みやすい形式の説明です。64 文字まで設定できます。
VoiceUrl このドメインがコールを受信した時にTwilioがリクエストするURL
VoiceMethod voice_urlをリクエストするときに使用されるメソッド。GETもしくはPOSTです
VoiceFallbackUrl VoiceUrlによってTwiMLが読み出され、実行された時にエラーが起きた場合、TwilioはこのURLを呼び出します。
VoiceFallbackMethod VoiceFallbackUrlをリクエストする時に使用されるHTTPメソッド。GETもしくはPOSTです。
VoiceStatusCallbackUrl ステータス パラメーター (通話の終了など) をアプリケーションへ渡すために、Twilio がリクエストを送信する URL です。
VoiceStatusCallbackMethod StatusCallback URLが呼び出される際に使用されるHTTPメソッド。GETもしくはPOSTです。
SIP ドメインの作成
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Create(
            "marlo.sip.twilio.com", accountSid, "My Domain", "IP_ACL",
            new Uri("https://demo.twilio.com/welcome"));

        Console.WriteLine(domain.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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client
    ->sip
    ->domains
    ->create(
        "dunder-mifflin-scranton.sip.twilio.com",
        array(
            "friendlyName" => "Scranton Office",
            "voiceUrl" => "https://dundermifflin.example.com/twilio/app.php"
        )
    );

echo $domain->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)

domain = client.sip.domains.create(friendly_name="My Domain",
    voice_url="https://demo.twilio.com/welcome",
    auth_type="IP_ACL",
    domain_name="marlo.sip.twilio.com")
print(domain.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

domain = @client.account.sip.domains.create(
  friendly_name: 'My Domain',
  voice_url: 'https://demo.twilio.com/welcome',
  auth_type: 'IP_ACL',
  domain_name: 'marlo.sip.twilio.com'
)

puts domain.domain_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -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.sip.DomainFactory;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
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 DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "My Domain"));
    params.add(new BasicNameValuePair("VoiceUrl", "https://demo.twilio.com/welcome"));
    params.add(new BasicNameValuePair("AuthType", "IP_ACL"));
    params.add(new BasicNameValuePair("DomainName", "marlo.sip.twilio.com"));
    
    
    DomainFactory domainFactory = client.getAccount().getDomainFactory();
    Domain domain = domainFactory.create(params);
    System.out.println(domain.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)

domain = client.sip \
        .domains \
        .create("dunder-mifflin-scranton.sip.twilio.com",
                friendly_name="Scranton Office",
                voice_url="https://dundermifflin.example.com/twilio/app.php")

print(domain.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: 'My Domain',
    voiceUrl: 'https://demo.twilio.com/welcome',
    authType: 'IP_ACL',
    domainName: 'marlo.sip.twilio.com',
})
.then((domain) => {
    process.stdout.write(domain.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 DomainOptions();
    options.FriendlyName = "My Domain";
    options.VoiceUrl = "https://demo.twilio.com/welcome";
    options.AuthType = "IP_ACL";
    options.DomainName = "marlo.sip.twilio.com";
    var domain = twilio.CreateDomain(options);

    Console.WriteLine(domain.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);

$domain = $client->account->sip->domains->create(
    "My Domain",
    "marlo.sip.twilio.com",
    array(
        "VoiceUrl" => "https://demo.twilio.com/welcome",
        "AuthType" => "IP_ACL"
    )
);
echo $domain->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

domain = @client.account.sip.domains.create(:friendly_name => "My Domain",
    :voice_url => "https://demo.twilio.com/welcome",
    :auth_type => "IP_ACL",
    :domain_name => "marlo.sip.twilio.com")
puts domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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

    Domain domain = Domain.creator("marlo.sip.twilio.com")
        .setFriendlyName("My Domain")
        .setVoiceUrl("https://demo.twilio.com/welcome")
        .setAuthType("IP_ACL")
        .create();

    System.out.println(domain.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.sip.domains.create({
    friendlyName: "My Domain",
    voiceUrl: "https://demo.twilio.com/welcome",
    authType: "IP_ACL",
    domainName: "marlo.sip.twilio.com"
}, function(err, domain) {
    process.stdout.write(domain.sid);
});
出力を表示
  • JSON
  • XML
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SIP ドメインの作成

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

ドメインインスタンスリソース

SIPドメインインスタンスは一つのドメインを閲覧、変更、削除を行えます。

インスタンスリソースは上記のプロパティーで表示されます。

リソース URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}

HTTP GET

SIDによって特定されたインスタンスを返します

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}
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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Fetch("SD32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(domain.VoiceMethod);
    }
}
<?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
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->fetch();

echo $domain->voiceMethod;
# 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)

domain = client.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
print(domain.voice_method)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

puts @domain.voice_method
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -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.sip.Domain;

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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    System.out.println(domain.getVoiceMethod());
    
  }
}
# 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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
               .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
               .fetch()

print(domain.voice_method)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .fetch()
  .then((domain) => console.log(domain.voiceMethod));
// 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 domain = twilio.GetDomain("SD32a3c49700934481addd5ce1659f04d2");

    Console.WriteLine(domain.VoiceMethod);
  }
}
<?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
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
echo $domain->voice_method;
# 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
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
puts @domain.voice_method
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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
    Domain domain = Domain.fetcher("SD32a3c49700934481addd5ce1659f04d2").fetch();

    System.out.println(domain.getVoiceMethod());
  }
}
// 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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").get(function(err, domain) {
    console.log(domain.voiceMethod);
});
出力を表示
  • JSON
  • XML
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SIPドメインのすべてのインスタンスを取得する

HTTP POST

ドメインの属性をアップデートします

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}
SIP ドメインのインスタンスの更新
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Update("SD32a3c49700934481addd5ce1659f04d2",
            friendlyName: "Little Kevin", voiceMethod: "GET");
    }
}
<?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
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->update(
        array(
            "friendlyName" => "Little Kevin",
            "voiceMethod" => "GET"
        )
    );

echo $domain->domainName;
# 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)

domain = client.sip.domains.update("SD32a3c49700934481addd5ce1659f04d2", friendly_name="Little Kevin",
    voice_method="GET")
print(domain.domain_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

@domain.update(
  friendly_name: 'Little Kevin',
  voice_method: 'GET'
)

puts @domain.domain_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -d "FriendlyName=Little%20Kevin" \
    -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.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Little Kevin"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    domain.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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
        .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
        .update(friendly_name="Little Kevin", voice_method="GET")

print(domain.domain_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .update({
    friendlyName: 'Little Kevin',
    voiceMethod: 'GET',
  })
  .then((domain) => {
    console.log(domain.domainName);
  });
// 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 DomainOptions();
    options.FriendlyName = "Little Kevin";
    options.VoiceMethod = "GET";

    twilio.UpdateDomain("SD32a3c49700934481addd5ce1659f04d2", 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
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
$domain->update(array(
        "FriendlyName" => "Little Kevin",
    "VoiceMethod" => "GET"
    ));
echo $domain->domain_name;
# 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
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.update(:friendly_name => "Little Kevin",
    :voice_method => "GET")
puts @domain.domain_name
// 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.sip.Domain;

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
    Domain domain = Domain.updater("SD32a3c49700934481addd5ce1659f04d2")
        .setFriendlyName("Little Kevin")
        .setVoiceMethod(HttpMethod.GET)
        .update();

    System.out.println(domain.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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").update({
    friendlyName: "Little Kevin",
    voiceMethod: "GET"
}, function(err, domain) {
    console.log(domain.domainName);
});
出力を表示
  • JSON
  • XML
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office Dev",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "GET",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office Dev</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>GET</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>GET</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SIP ドメインのインスタンスの更新

HTTP PUT

サポートしません。

HTTP DELETE

ドメインを削除します。ドメインのサブドメインを作っていた場合、サブドメインをすべて削除するまでドメイン本体を削除することはできません。

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

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}
SIP ドメインのインスタンスの削除
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Delete("SD32a3c49700934481addd5ce1659f04d2");
    }
}
<?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);

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

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

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

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

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

@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2')
                 .fetch

@domain.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -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.sip.Domain;

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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    
    domain.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteDomain("SD32a3c49700934481addd5ce1659f04d2");
  }
}
<?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);

$client->account->sip->domains->delete("SD32a3c49700934481addd5ce1659f04d2");
# 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

@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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
    Domain.deleter("SD32a3c49700934481addd5ce1659f04d2").delete();
  }
}
// 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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid SD32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});
SIP ドメインのインスタンスの削除

ドメインインスタンスサブリソース

ドメイン IpAccessControlListMapping リストサブリソース

IpAccessControlListMappingサブリソースはドメインにに関連付けられたIpAccessControlListを含みます。INVITEをドメインから受け取った場合、ソースIPアドレスはINVITEを許容するリストに含まれなければなりません。

リソース URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings

リソースのプロパティ

IpAccessControlListMappingリソースは下記のプロパティに含まれます。

プロパティ 説明
Sid A34文字はドメインにあなたがマップしたIpAccessControlListを表す一意な文字列です
AccountSid アカウントに対する一意のID
FriendlyName 人間が読みやすい形式の説明です。64 文字まで設定できます。
DateCreated このリソースが生成された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
DateUpdated DateUpdated | このリソースが最後に更新された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
Uri URIリソース、右に関連する https://api.twilio.com

HTTP GET

ドメインに関連付けられたIpAccessControlListMappingを返します

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings

SIDによって特定されたインスタンスを返します

SIP ドメインのインスタンスの取得
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Fetch("SD32a3c49700934481addd5ce1659f04d2",
                   "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.FriendlyName);
    }
}
<?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
$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->fetch();

echo $ipAccessControlListMapping->friendlyName;
# 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)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").get("AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.friendly_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@ip_acl_list_map_sid = 'AL95a47094615fe05b7c17e62a7877836c'

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_acl_list_map = @client.account.sip
                          .domains('SD32a3c49700934481addd5ce1659f04d2')
                          .ip_access_control_list_mappings(@ip_acl_list_map_sid)
                          .fetch

puts @ip_acl_list_map.friendly_name
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -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.sip.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    System.out.println(ipAccessControlListMapping.getFriendlyName());
    
  }
}
# 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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
        .fetch()

print(ip_access_control_list_mapping.friendly_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .fetch()
  .then((ipAccessControlListMapping) => {
    console.log(ipAccessControlListMapping.friendlyName);
});
// 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 ipAccessControlListMapping = twilio.GetIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.FriendlyName);
  }
}
<?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
$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->get("AL95a47094615fe05b7c17e62a7877836c");
echo $ip_access_control_list_mapping->friendly_name;
# 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
@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
puts @ip_access_control_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .fetcher("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .fetch();

    System.out.println(ipAccessControlListMapping.getFriendlyName());
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").get(function(err, ipAccessControlListMapping) {
    console.log(ipAccessControlListMapping.friendlyName);
});
出力を表示
  • JSON
  • XML
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
SIP ドメインのインスタンスの取得

HTTP POST

このドメインにIpAccessControlListをマップします

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings
POSTパラメータ

下記のパラメーターはIpAccessControlListMappingsにポストする際に必要です

パラメーター 説明
IpAccessControlListSid IpAccessControlListのSIDに関連付けたいドメイン。一度関連付けられると、Twilioはこのリストに基づきドメインに認証アクセスを開始します。
CredentialList をドメインにマップ
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Create("SD32a3c49700934481addd5ce1659f04d2",
                "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.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);

$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings
    ->create("AL95a47094615fe05b7c17e62a7877836c");

echo $ipAccessControlListMapping->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)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(ip_access_control_list_sid="AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

ip_acl_map = @client.account.sip
                    .domains('SD32a3c49700934481addd5ce1659f04d2')
                    .ip_access_control_list_mappings
                    .create(ip_access_control_list_sid: @ip_acl_list_sid)

puts ip_acl_map.friendly_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings.json \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -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.sip.IpAccessControlListMappingFactory;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;
import com.twilio.sdk.resource.list.sip.IpAccessControlListMappingList;
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 IpAccessControlListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("IpAccessControlListSid", "AL95a47094615fe05b7c17e62a7877836c"));
    
    
    IpAccessControlListMappingFactory ipAccessControlListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMappingFactory();
    IpAccessControlListMapping ipAccessControlListMapping = ipAccessControlListMappingFactory.create(params);
    System.out.println(ipAccessControlListMapping.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)

ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings \
        .create("AL95a47094615fe05b7c17e62a7877836c")

print(ip_access_control_list_mapping.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings
  .create({
    ipAccessControlListSid: 'AL95a47094615fe05b7c17e62a7877836c',
  })
  .then((ipAccessControlListMapping) => {
    process.stdout.write(ipAccessControlListMapping.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 ipAccessControlListMapping = twilio.CreateIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.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);

$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->create("AL95a47094615fe05b7c17e62a7877836c", array());
echo $ip_access_control_list_mapping->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

ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.create(:ip_access_control_list_sid => "AL95a47094615fe05b7c17e62a7877836c")
puts ip_access_control_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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

    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .create();

    System.out.println(ipAccessControlListMapping.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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings.create({
    ipAccessControlListSid: "AL95a47094615fe05b7c17e62a7877836c"
}, function(err, ipAccessControlListMapping) {
    process.stdout.write(ipAccessControlListMapping.sid);
});
出力を表示
  • JSON
  • XML
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
CredentialList をドメインにマップ

HTTP PUT

サポートしません。

HTTP DELETE

ドメインのマッピングを削除します。

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{ALSid}
ドメインの CredentialListMapping を削除
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        IpAccessControlListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "AL95a47094615fe05b7c17e62a7877836c");
    }
}
<?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);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

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

client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("AL95a47094615fe05b7c17e62a7877836c")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

@ip_acl_mapping = @client.account.sip.domains(@sip_domain_sid)
                         .ip_access_control_list_mappings(@ip_acl_list_sid)

@ip_acl_mapping.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -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.sip.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    
    ipAccessControlListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
  }
}
<?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);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->delete("AL95a47094615fe05b7c17e62a7877836c");
# 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

@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
@ip_access_control_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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
    IpAccessControlListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .delete();
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.");
    }
});
ドメインの CredentialListMapping を削除

ドメイン CredentialListMapping リストサブリソース

CredentialListMappings サブリソースはドメインに関連付けられたCredentialListを示します。CredentialリストにマップされたドメインへのINVITEを受信すると、Twilioはリクエストを試みます。あなたのシステムはユーザー名とパスワードの認証をする必要があります。ユーザー名とパスワードは許可されたINVITEのマップされたリストに含まれる必要があります。

リソース URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/CredentialListMappings

リソースのプロパティ

CredentialListMappingリソースは下記のプロパティにがあります。

プロパティ 説明
Sid A34文字はドメインにあなたがマップしたCredentialListを表す一意な文字列です
AccountSid アカウントに対する一意のID
FriendlyName 人間が読みやすい形式の説明です。64 文字まで設定できます。
DateCreated このリソースが生成された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
DateUpdated DateUpdated | このリソースが最後に更新された日付の GMT 表記です。 RFC 2822 フォーマットを使用します。
Uri URIリソース、右に関連する https://api.twilio.com

HTTP GET

ドメインにマップされたユーザーリストを取得します。

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/CredentialListMappings
CredentialListMapping の取得
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var credentialListMappings = CredentialListMappingResource.Read(
            "SD32a3c49700934481addd5ce1659f04d2");

        foreach (var credentialListMapping in credentialListMappings)
        {
          Console.WriteLine(credentialListMapping.FriendlyName);
        }
    }
}
<?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);

$credentialListMappings = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->read();

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($credentialListMappings as $credentialListMapping) {
    echo $credentialListMapping->friendlyName;
}
# 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 credential_list_mapping objects with the properties described above
credential_list_mappings = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Loop over credential_list_mappings and print out a property for each one
@client.account.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
       .credential_list_mappings.list
       .each do |credential_list_mapping|
         puts credential_list_mapping.friendly_name
       end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -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.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;

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

    
    
    CredentialListMappingList credentialListMappings = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappings();
    
    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
    
  }
}
# 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)

credential_list_mappings = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .list()

# Loop over the list of credential_list_mappings and print
# a property for each one
for credential_list_mapping in credential_list_mappings:
    print(credential_list_mapping.friendly_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .each((credentialListMapping) => {
    console.log(credentialListMapping.friendlyName)
  });
// 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 credentialListMappings = twilio.ListCredentialListMappings("SD32a3c49700934481addd5ce1659f04d2", null, null);
    
    foreach (var credentialListMapping in credentialListMappings.CredentialListMappings)
    {
      Console.WriteLine(credentialListMapping.FriendlyName);
    }
  }
}
<?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 credential_list_mappings and echo a property for each one
foreach ($client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings as $credential_list_mapping) {
    echo $credential_list_mapping->friendly_name;
}
# 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 credential_list_mappings and print out a property for each one
@client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.list.each do |credential_list_mapping|
    puts credential_list_mapping.friendly_name
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.sip.domain.CredentialListMapping;

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<CredentialListMapping> credentialListMappings =
        CredentialListMapping.reader("SD32a3c49700934481addd5ce1659f04d2").read();

    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.list(function(err, data) {
    data.credentialListMappings.forEach(function(credentialListMapping) {
        console.log(credentialListMapping.FriendlyName);
    });
});
出力を表示
  • JSON
  • XML
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "page_size": 50,
    "next_page_uri": null,
    "credential_list_mappings": [
        {
            "subresource_uris": {
                "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
            },
            "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
            "friendly_name": "Production Gateways IP Address - Scranton",
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "sid": "CL32a3c49700934481addd5ce1659f04d2",
            "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
        },
        ...
    ],
    "page": 0
}
<TwilioResponse>
    <CredentialListMappings [paging data]>
        <CredentialListMapping>
            <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
            <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
            <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/</Uri>
            <SubresourceUris>
                <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
            </SubresourceUris>
        </CredentialListMapping>
    </CredentialListMappings>
</TwilioResponse>
CredentialListMapping の取得

HTTP POST

CredentialListをドメインにマップします

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/CredentialListMappings
POSTパラメータ

下記のパラメーターはCredentialListMappingにポストする際に必要です

パラメーター 説明
CredentialListSid CredentialListのSIDに関連付けたいドメイン。一度関連付けられると、Twilioはこのリストに基づきドメインに認証アクセスを開始します。
ドメインにCredentialListを割り当てる
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var credentialListMapping = CredentialListMappingResource.Create(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(credentialListMapping.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);

$credentialListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->create("CL32a3c49700934481addd5ce1659f04d2");

echo $credentialListMapping->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)

credential_list_mapping = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(credential_list_sid="CL32a3c49700934481addd5ce1659f04d2")
print(credential_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@cred_list_sid = 'CL32a3c49700934481addd5ce1659f04d2'

# Get the credential mappings for the given sip domain and add a credential list
cred_list_mapping = @client.account.sip
                           .domains('SD32a3c49700934481addd5ce1659f04d2')
                           .credential_list_mappings
                           .create(credential_list_sid: @cred_list_sid)

puts cred_list_mapping.friendly_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -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.sip.CredentialListMappingFactory;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;
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 CredentialListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CredentialListSid", "CL32a3c49700934481addd5ce1659f04d2"));
    
    
    CredentialListMappingFactory credentialListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappingFactory();
    CredentialListMapping credentialListMapping = credentialListMappingFactory.create(params);
    System.out.println(credentialListMapping.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)

credential_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .create("CL32a3c49700934481addd5ce1659f04d2")

print(credential_list_mapping.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .create({
    credentialListSid: 'CL32a3c49700934481addd5ce1659f04d2',
  })
  .then((credentialListMapping) => {
    process.stdout.write(credentialListMapping.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 credentialListMapping = twilio.CreateCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
    
    Console.WriteLine(credentialListMapping.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);

$credential_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->create("CL32a3c49700934481addd5ce1659f04d2", array());
echo $credential_list_mapping->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

credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.create(:credential_list_sid => "CL32a3c49700934481addd5ce1659f04d2")
puts credential_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

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

    CredentialListMapping credentialListMapping = CredentialListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .create();

    System.out.println(credentialListMapping.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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.create({
    credentialListSid: "CL32a3c49700934481addd5ce1659f04d2"
}, function(err, credentialListMapping) {
    process.stdout.write(credentialListMapping.sid);
});
出力を表示
  • JSON
  • XML
{
    "subresource_uris": {
        "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
    },
    "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sid": "CL32a3c49700934481addd5ce1659f04d2",
    "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
}
<TwilioResponse>
    <CredentialListMapping>
        <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2</Uri>
        <SubresourceUris>
            <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
        </SubresourceUris>
    </CredentialListMapping>
</TwilioResponse>
ドメインにCredentialListを割り当てる

HTTP PUT

サポートしません。

HTTP DELETE

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/CredentialListMappings/{CLSid}

ドメインのCredentialListマッピングを削除します。

CredentialListMapping の削除
  • 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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        CredentialListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");
    }
}
<?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);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings("CL32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

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

client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("CL32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@cred_list_mapping_sid = 'CL32a3c49700934481addd5ce1659f04d2'

@cred_list_mapping = @client.account.sip
                            .domains(@sip_domain_sid)
                            .credential_list_mappings(@cred_list_mapping_sid)

@cred_list_mapping.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2 \
    -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.sip.CredentialListMapping;

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
    CredentialListMapping credentialListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMapping("CL32a3c49700934481addd5ce1659f04d2");
    
    credentialListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .credential_list_mappings("CL32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
  }
}
<?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);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->delete("CL32a3c49700934481addd5ce1659f04d2");
# 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

@credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.get("CL32a3c49700934481addd5ce1659f04d2")
@credential_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

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
    CredentialListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .delete();
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings("CL32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid CL32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});
CredentialListMapping の削除
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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domains = DomainResource.Read();

        foreach (var domain in domains)
        {
          Console.WriteLine(domain.DomainName);
        }
    }
}
<?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 domains and echo a property for each one
foreach ($client->sip->domains->read() as $domain) {
    echo $domain->domainName;
}
# 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 domain objects with the properties described above
domains = client.sip.domains.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Loop over domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
  puts domain.domain_name
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -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.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;

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

    
    
    DomainList domains = client.getAccount().getDomains();
    
    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
    
  }
}
# 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)

# Loop over the list of domains and print(a property for each one
for domain in client.sip.domains.list():
    print(domain.domain_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.each((domain) => {
  console.log(domain.domainName);
});
// 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 domains = twilio.ListDomains();

    foreach (var domain in domains.Domains)
    {
      Console.WriteLine(domain.DomainName);
    }
  }
}
<?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 domains and echo a property for each one
foreach ($client->account->sip->domains as $domain) {
    echo $domain->domain_name;
}
# 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 domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
    puts domain.domain_name
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.sip.Domain;

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<Domain> domains = Domain.reader().read();

    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
  }
}
// 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.sip.domains.list(function(err, data) {
    data.domains.forEach(function(domain) {
        console.log(domain.DomainName);
    });
});
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "page_size": 50,
    "sip_domains": [
        {
            "auth_type": "",
            "voice_status_callback_method": "POST",
            "subresource_uris": {
                "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings.json",
                "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings.json"
            },
            "date_updated": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_status_callback_url": null,
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776.json",
            "friendly_name": "Scranton Office",
            "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "voice_url": "https://dundermifflin.example.com/twilio/app.php",
            "voice_method": "POST",
            "sid": "SD098e7b11c00d0ba152b1d3f084c4b776",
            "date_created": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_fallback_method": "POST",
            "api_version": "2010-04-01",
            "voice_fallback_url": null
        },
        ...
    ],
    "next_page_uri": null,
    "page": 0
}
<TwilioResponse>
    <SipDomains [paging attributes]>
        <SipDomain>
            <Sid>SD098e7b11c00d0ba152b1d3f084c4b776</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Scranton Office</FriendlyName>
            <ApiVersion>2010-04-01</ApiVersion>
            <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
            <AuthType/>
            <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
            <VoiceMethod>POST</VoiceMethod>
            <VoiceFallbackUrl/>
            <VoiceFallbackMethod>POST</VoiceFallbackMethod>
            <VoiceStatusCallbackUrl/>
            <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
            <DateCreated>Fri, 06 Sep 2013 18:48:50 -0000</DateCreated>
            <DateUpdated>Fri, 06 Sep 2013 18:48:50 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776</Uri>
            <SubresourceUris>
                <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings</CredentialListMappings>
                <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings</IpAccessControlListMappings>
            </SubresourceUris>
        </SipDomain>
        ...
    </SipDomains>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Create(
            "marlo.sip.twilio.com", accountSid, "My Domain", "IP_ACL",
            new Uri("https://demo.twilio.com/welcome"));

        Console.WriteLine(domain.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);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client
    ->sip
    ->domains
    ->create(
        "dunder-mifflin-scranton.sip.twilio.com",
        array(
            "friendlyName" => "Scranton Office",
            "voiceUrl" => "https://dundermifflin.example.com/twilio/app.php"
        )
    );

echo $domain->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)

domain = client.sip.domains.create(friendly_name="My Domain",
    voice_url="https://demo.twilio.com/welcome",
    auth_type="IP_ACL",
    domain_name="marlo.sip.twilio.com")
print(domain.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

domain = @client.account.sip.domains.create(
  friendly_name: 'My Domain',
  voice_url: 'https://demo.twilio.com/welcome',
  auth_type: 'IP_ACL',
  domain_name: 'marlo.sip.twilio.com'
)

puts domain.domain_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -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.sip.DomainFactory;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
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 DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "My Domain"));
    params.add(new BasicNameValuePair("VoiceUrl", "https://demo.twilio.com/welcome"));
    params.add(new BasicNameValuePair("AuthType", "IP_ACL"));
    params.add(new BasicNameValuePair("DomainName", "marlo.sip.twilio.com"));
    
    
    DomainFactory domainFactory = client.getAccount().getDomainFactory();
    Domain domain = domainFactory.create(params);
    System.out.println(domain.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)

domain = client.sip \
        .domains \
        .create("dunder-mifflin-scranton.sip.twilio.com",
                friendly_name="Scranton Office",
                voice_url="https://dundermifflin.example.com/twilio/app.php")

print(domain.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: 'My Domain',
    voiceUrl: 'https://demo.twilio.com/welcome',
    authType: 'IP_ACL',
    domainName: 'marlo.sip.twilio.com',
})
.then((domain) => {
    process.stdout.write(domain.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 DomainOptions();
    options.FriendlyName = "My Domain";
    options.VoiceUrl = "https://demo.twilio.com/welcome";
    options.AuthType = "IP_ACL";
    options.DomainName = "marlo.sip.twilio.com";
    var domain = twilio.CreateDomain(options);

    Console.WriteLine(domain.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);

$domain = $client->account->sip->domains->create(
    "My Domain",
    "marlo.sip.twilio.com",
    array(
        "VoiceUrl" => "https://demo.twilio.com/welcome",
        "AuthType" => "IP_ACL"
    )
);
echo $domain->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

domain = @client.account.sip.domains.create(:friendly_name => "My Domain",
    :voice_url => "https://demo.twilio.com/welcome",
    :auth_type => "IP_ACL",
    :domain_name => "marlo.sip.twilio.com")
puts domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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

    Domain domain = Domain.creator("marlo.sip.twilio.com")
        .setFriendlyName("My Domain")
        .setVoiceUrl("https://demo.twilio.com/welcome")
        .setAuthType("IP_ACL")
        .create();

    System.out.println(domain.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.sip.domains.create({
    friendlyName: "My Domain",
    voiceUrl: "https://demo.twilio.com/welcome",
    authType: "IP_ACL",
    domainName: "marlo.sip.twilio.com"
}, function(err, domain) {
    process.stdout.write(domain.sid);
});
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Fetch("SD32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(domain.VoiceMethod);
    }
}
<?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
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->fetch();

echo $domain->voiceMethod;
# 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)

domain = client.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
print(domain.voice_method)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

puts @domain.voice_method
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -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.sip.Domain;

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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    System.out.println(domain.getVoiceMethod());
    
  }
}
# 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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
               .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
               .fetch()

print(domain.voice_method)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .fetch()
  .then((domain) => console.log(domain.voiceMethod));
// 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 domain = twilio.GetDomain("SD32a3c49700934481addd5ce1659f04d2");

    Console.WriteLine(domain.VoiceMethod);
  }
}
<?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
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
echo $domain->voice_method;
# 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
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
puts @domain.voice_method
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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
    Domain domain = Domain.fetcher("SD32a3c49700934481addd5ce1659f04d2").fetch();

    System.out.println(domain.getVoiceMethod());
  }
}
// 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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").get(function(err, domain) {
    console.log(domain.voiceMethod);
});
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Update("SD32a3c49700934481addd5ce1659f04d2",
            friendlyName: "Little Kevin", voiceMethod: "GET");
    }
}
<?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
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->update(
        array(
            "friendlyName" => "Little Kevin",
            "voiceMethod" => "GET"
        )
    );

echo $domain->domainName;
# 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)

domain = client.sip.domains.update("SD32a3c49700934481addd5ce1659f04d2", friendly_name="Little Kevin",
    voice_method="GET")
print(domain.domain_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

@domain.update(
  friendly_name: 'Little Kevin',
  voice_method: 'GET'
)

puts @domain.domain_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -d "FriendlyName=Little%20Kevin" \
    -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.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Little Kevin"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    domain.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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
        .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
        .update(friendly_name="Little Kevin", voice_method="GET")

print(domain.domain_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .update({
    friendlyName: 'Little Kevin',
    voiceMethod: 'GET',
  })
  .then((domain) => {
    console.log(domain.domainName);
  });
// 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 DomainOptions();
    options.FriendlyName = "Little Kevin";
    options.VoiceMethod = "GET";

    twilio.UpdateDomain("SD32a3c49700934481addd5ce1659f04d2", 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
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
$domain->update(array(
        "FriendlyName" => "Little Kevin",
    "VoiceMethod" => "GET"
    ));
echo $domain->domain_name;
# 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
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.update(:friendly_name => "Little Kevin",
    :voice_method => "GET")
puts @domain.domain_name
// 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.sip.Domain;

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
    Domain domain = Domain.updater("SD32a3c49700934481addd5ce1659f04d2")
        .setFriendlyName("Little Kevin")
        .setVoiceMethod(HttpMethod.GET)
        .update();

    System.out.println(domain.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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").update({
    friendlyName: "Little Kevin",
    voiceMethod: "GET"
}, function(err, domain) {
    console.log(domain.domainName);
});
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office Dev",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "GET",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office Dev</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>GET</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>GET</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

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

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Delete("SD32a3c49700934481addd5ce1659f04d2");
    }
}
<?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);

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

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

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

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

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

@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2')
                 .fetch

@domain.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -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.sip.Domain;

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
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    
    domain.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteDomain("SD32a3c49700934481addd5ce1659f04d2");
  }
}
<?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);

$client->account->sip->domains->delete("SD32a3c49700934481addd5ce1659f04d2");
# 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

@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

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
    Domain.deleter("SD32a3c49700934481addd5ce1659f04d2").delete();
  }
}
// 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.sip.domains("SD32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid SD32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});
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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Fetch("SD32a3c49700934481addd5ce1659f04d2",
                   "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.FriendlyName);
    }
}
<?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
$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->fetch();

echo $ipAccessControlListMapping->friendlyName;
# 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)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").get("AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.friendly_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@ip_acl_list_map_sid = 'AL95a47094615fe05b7c17e62a7877836c'

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_acl_list_map = @client.account.sip
                          .domains('SD32a3c49700934481addd5ce1659f04d2')
                          .ip_access_control_list_mappings(@ip_acl_list_map_sid)
                          .fetch

puts @ip_acl_list_map.friendly_name
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -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.sip.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    System.out.println(ipAccessControlListMapping.getFriendlyName());
    
  }
}
# 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)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
        .fetch()

print(ip_access_control_list_mapping.friendly_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .fetch()
  .then((ipAccessControlListMapping) => {
    console.log(ipAccessControlListMapping.friendlyName);
});
// 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 ipAccessControlListMapping = twilio.GetIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.FriendlyName);
  }
}
<?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
$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->get("AL95a47094615fe05b7c17e62a7877836c");
echo $ip_access_control_list_mapping->friendly_name;
# 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
@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
puts @ip_access_control_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .fetcher("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .fetch();

    System.out.println(ipAccessControlListMapping.getFriendlyName());
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").get(function(err, ipAccessControlListMapping) {
    console.log(ipAccessControlListMapping.friendlyName);
});
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Create("SD32a3c49700934481addd5ce1659f04d2",
                "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.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);

$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings
    ->create("AL95a47094615fe05b7c17e62a7877836c");

echo $ipAccessControlListMapping->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)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(ip_access_control_list_sid="AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

ip_acl_map = @client.account.sip
                    .domains('SD32a3c49700934481addd5ce1659f04d2')
                    .ip_access_control_list_mappings
                    .create(ip_access_control_list_sid: @ip_acl_list_sid)

puts ip_acl_map.friendly_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings.json \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -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.sip.IpAccessControlListMappingFactory;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;
import com.twilio.sdk.resource.list.sip.IpAccessControlListMappingList;
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 IpAccessControlListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("IpAccessControlListSid", "AL95a47094615fe05b7c17e62a7877836c"));
    
    
    IpAccessControlListMappingFactory ipAccessControlListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMappingFactory();
    IpAccessControlListMapping ipAccessControlListMapping = ipAccessControlListMappingFactory.create(params);
    System.out.println(ipAccessControlListMapping.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)

ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings \
        .create("AL95a47094615fe05b7c17e62a7877836c")

print(ip_access_control_list_mapping.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings
  .create({
    ipAccessControlListSid: 'AL95a47094615fe05b7c17e62a7877836c',
  })
  .then((ipAccessControlListMapping) => {
    process.stdout.write(ipAccessControlListMapping.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 ipAccessControlListMapping = twilio.CreateIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.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);

$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->create("AL95a47094615fe05b7c17e62a7877836c", array());
echo $ip_access_control_list_mapping->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

ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.create(:ip_access_control_list_sid => "AL95a47094615fe05b7c17e62a7877836c")
puts ip_access_control_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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

    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .create();

    System.out.println(ipAccessControlListMapping.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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings.create({
    ipAccessControlListSid: "AL95a47094615fe05b7c17e62a7877836c"
}, function(err, ipAccessControlListMapping) {
    process.stdout.write(ipAccessControlListMapping.sid);
});
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        IpAccessControlListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "AL95a47094615fe05b7c17e62a7877836c");
    }
}
<?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);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

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

client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("AL95a47094615fe05b7c17e62a7877836c")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

@ip_acl_mapping = @client.account.sip.domains(@sip_domain_sid)
                         .ip_access_control_list_mappings(@ip_acl_list_sid)

@ip_acl_mapping.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -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.sip.IpAccessControlListMapping;

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
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    
    ipAccessControlListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
  }
}
<?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);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->delete("AL95a47094615fe05b7c17e62a7877836c");
# 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

@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
@ip_access_control_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

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
    IpAccessControlListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .delete();
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.");
    }
});
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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var credentialListMappings = CredentialListMappingResource.Read(
            "SD32a3c49700934481addd5ce1659f04d2");

        foreach (var credentialListMapping in credentialListMappings)
        {
          Console.WriteLine(credentialListMapping.FriendlyName);
        }
    }
}
<?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);

$credentialListMappings = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->read();

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($credentialListMappings as $credentialListMapping) {
    echo $credentialListMapping->friendlyName;
}
# 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 credential_list_mapping objects with the properties described above
credential_list_mappings = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

# Loop over credential_list_mappings and print out a property for each one
@client.account.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
       .credential_list_mappings.list
       .each do |credential_list_mapping|
         puts credential_list_mapping.friendly_name
       end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -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.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;

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

    
    
    CredentialListMappingList credentialListMappings = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappings();
    
    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
    
  }
}
# 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)

credential_list_mappings = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .list()

# Loop over the list of credential_list_mappings and print
# a property for each one
for credential_list_mapping in credential_list_mappings:
    print(credential_list_mapping.friendly_name)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .each((credentialListMapping) => {
    console.log(credentialListMapping.friendlyName)
  });
// 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 credentialListMappings = twilio.ListCredentialListMappings("SD32a3c49700934481addd5ce1659f04d2", null, null);
    
    foreach (var credentialListMapping in credentialListMappings.CredentialListMappings)
    {
      Console.WriteLine(credentialListMapping.FriendlyName);
    }
  }
}
<?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 credential_list_mappings and echo a property for each one
foreach ($client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings as $credential_list_mapping) {
    echo $credential_list_mapping->friendly_name;
}
# 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 credential_list_mappings and print out a property for each one
@client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.list.each do |credential_list_mapping|
    puts credential_list_mapping.friendly_name
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.sip.domain.CredentialListMapping;

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<CredentialListMapping> credentialListMappings =
        CredentialListMapping.reader("SD32a3c49700934481addd5ce1659f04d2").read();

    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.list(function(err, data) {
    data.credentialListMappings.forEach(function(credentialListMapping) {
        console.log(credentialListMapping.FriendlyName);
    });
});
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "page_size": 50,
    "next_page_uri": null,
    "credential_list_mappings": [
        {
            "subresource_uris": {
                "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
            },
            "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
            "friendly_name": "Production Gateways IP Address - Scranton",
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "sid": "CL32a3c49700934481addd5ce1659f04d2",
            "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
        },
        ...
    ],
    "page": 0
}
<TwilioResponse>
    <CredentialListMappings [paging data]>
        <CredentialListMapping>
            <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
            <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
            <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/</Uri>
            <SubresourceUris>
                <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
            </SubresourceUris>
        </CredentialListMapping>
    </CredentialListMappings>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        var credentialListMapping = CredentialListMappingResource.Create(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(credentialListMapping.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);

$credentialListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->create("CL32a3c49700934481addd5ce1659f04d2");

echo $credentialListMapping->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)

credential_list_mapping = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(credential_list_sid="CL32a3c49700934481addd5ce1659f04d2")
print(credential_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@cred_list_sid = 'CL32a3c49700934481addd5ce1659f04d2'

# Get the credential mappings for the given sip domain and add a credential list
cred_list_mapping = @client.account.sip
                           .domains('SD32a3c49700934481addd5ce1659f04d2')
                           .credential_list_mappings
                           .create(credential_list_sid: @cred_list_sid)

puts cred_list_mapping.friendly_name
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -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.sip.CredentialListMappingFactory;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;
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 CredentialListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CredentialListSid", "CL32a3c49700934481addd5ce1659f04d2"));
    
    
    CredentialListMappingFactory credentialListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappingFactory();
    CredentialListMapping credentialListMapping = credentialListMappingFactory.create(params);
    System.out.println(credentialListMapping.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)

credential_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .create("CL32a3c49700934481addd5ce1659f04d2")

print(credential_list_mapping.sid)
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .create({
    credentialListSid: 'CL32a3c49700934481addd5ce1659f04d2',
  })
  .then((credentialListMapping) => {
    process.stdout.write(credentialListMapping.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 credentialListMapping = twilio.CreateCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
    
    Console.WriteLine(credentialListMapping.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);

$credential_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->create("CL32a3c49700934481addd5ce1659f04d2", array());
echo $credential_list_mapping->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

credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.create(:credential_list_sid => "CL32a3c49700934481addd5ce1659f04d2")
puts credential_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

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

    CredentialListMapping credentialListMapping = CredentialListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .create();

    System.out.println(credentialListMapping.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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.create({
    credentialListSid: "CL32a3c49700934481addd5ce1659f04d2"
}, function(err, credentialListMapping) {
    process.stdout.write(credentialListMapping.sid);
});
{
    "subresource_uris": {
        "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
    },
    "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sid": "CL32a3c49700934481addd5ce1659f04d2",
    "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
}
<TwilioResponse>
    <CredentialListMapping>
        <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2</Uri>
        <SubresourceUris>
            <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
        </SubresourceUris>
    </CredentialListMapping>
</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
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

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

        TwilioClient.Init(accountSid, authToken);

        CredentialListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");
    }
}
<?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);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings("CL32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

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

client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("CL32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

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

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

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@cred_list_mapping_sid = 'CL32a3c49700934481addd5ce1659f04d2'

@cred_list_mapping = @client.account.sip
                            .domains(@sip_domain_sid)
                            .credential_list_mappings(@cred_list_mapping_sid)

@cred_list_mapping.delete
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2 \
    -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.sip.CredentialListMapping;

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
    CredentialListMapping credentialListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMapping("CL32a3c49700934481addd5ce1659f04d2");
    
    credentialListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .credential_list_mappings("CL32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

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

    twilio.DeleteCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
  }
}
<?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);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->delete("CL32a3c49700934481addd5ce1659f04d2");
# 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

@credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.get("CL32a3c49700934481addd5ce1659f04d2")
@credential_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

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
    CredentialListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .delete();
  }
}
// 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.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings("CL32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid CL32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});