REST API: メンバー

Members リスト リソースは、Queue インスタンス リソースのサブリソースです。現在キューに存在するメンバーのセットを表現します。

Member インスタンス リソース は、個々キューのメンバーを表現します。 それぞれのメンバーは CallSid で識別されます。

Member インスタンス リソース

CallSid で識別される、単一のキューのメンバーを表現します。 または、Front を指定することで、キューの先頭を示すこともできます。

リソース URI

キューの中の、特定の通話です。

/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}

キューの先頭です。

/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/Front

リソースのプロパティ

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

プロパティ 説明
CallSid キューに入れられた通話を一意に識別する 34 文字の文字列です。
DateEnqueued このメンバーがキューに入れられた日付です。RFC 2822 フォーマットを使用します。
WaitTime このメンバーがキューで待機している時間 (秒) です。
キューの中での、このメンバーの現在の位置です。

HTTP GET

CallSid を指定するか、または Front でキューの先頭を指定してメンバーを取得します。

Loading Code Samples...
言語
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;

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

        var queueMember = MemberResource.Fetch(queueSid, callSid);

        Console.WriteLine(queueMember.WaitTime);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("CA386025c9bf5d6052a1d1ea42b4d16662")
    ->fetch();

echo $member->waitTime;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').get("CA386025c9bf5d6052a1d1ea42b4d16662")
print(member.wait_time)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('CA386025c9bf5d6052a1d1ea42b4d16662').fetch

puts @member.wait_time
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("CA386025c9bf5d6052a1d1ea42b4d16662").get(function(err, member) {
    console.log(member.waitTime);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const memberSid = 'CA386025c9bf5d6052a1d1ea42b4d16662';

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members(memberSid)
  .fetch()
  .then((member) => console.log(member.waitTime));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA386025c9bf5d6052a1d1ea42b4d16662 \
    -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.Member;

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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("CA386025c9bf5d6052a1d1ea42b4d16662");
    System.out.println(member.getWaitTime());
    
  }
}
# 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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("CA386025c9bf5d6052a1d1ea42b4d16662") \
               .fetch();

print(member.wait_time)
// 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 queueMember = twilio.GetQueueMember("QU5ef8732a3c49700934481addd5ce1659", "CA386025c9bf5d6052a1d1ea42b4d16662");
    
    Console.WriteLine(queueMember.WaitTime);
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("CA386025c9bf5d6052a1d1ea42b4d16662");
echo $member->wait_time;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("CA386025c9bf5d6052a1d1ea42b4d16662")
puts @member.wait_time
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.queue.Member;

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
    Member member =
        Member.fetcher("QU5ef8732a3c49700934481addd5ce1659", "CA386025c9bf5d6052a1d1ea42b4d16662")
            .fetch();

    System.out.println(member.getWaitTime());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position": 1,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>1</Position>
    </QueueMember>
 </TwilioResponse>
Member リソースを取得する

HTTP POST

Queue インスタンスに URL と Method を POST して、メンバーをキューから外し、この URL の TwiML 文書を実行して、このメンバーの通話を開始します。

CallSid で個々のメンバーを指定するか、または Front でキューの先頭を指定します。

CallSid で指定したキューのメンバーをリダイレクトする際、最初のリクエストのみが成功し、200 のレスポンス コードが返ります。 2 番目のリクエストは失敗し、適切な 400 番台のレスポンス コードが返ります。 キューの Front からデキューすると、このキューの次の通話がリダイレクトされます。

例 1: キューの先頭から外す
Loading Code Samples...
言語
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
using Twilio.Http;
using System.Linq;

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

        const string queueSid = "QU5ef8732a3c49700934481addd5ce1659";
        const string callSid = "Front";
        var twimlUrl = new Uri("http://demo.twilio.com/docs/voice.xml");

        MemberResource.Update(queueSid,
                              callSid,
                              twimlUrl,
                              HttpMethod.Post);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("Front")
    ->update(
        "http://demo.twilio.com/docs/voice.xml",
        "POST"
    );

echo $member->waitTime;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').dequeue("http://demo.twilio.com/docs/voice.xml", "Front", method="POST")
print(member.wait_time)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('Front').fetch
@member.update(
  url: 'http://demo.twilio.com/docs/voice.xml',
  method: 'POST'
)

puts @member.wait_time
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("Front").update({
    url: "http://demo.twilio.com/docs/voice.xml",
    method: "POST"
}, function(err, member) {
    console.log(member.waitTime);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members('Front')
  .update({
    url: 'http://demo.twilio.com/docs/voice.xml',
    method: 'POST',
  })
  .then((member) => console.log(member.waitTime));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/Front \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;
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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("Front");
    // Build a filter for the MemberList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("Url", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("Method", "POST"));
    member.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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("Front") \
               .update(url="http://demo.twilio.com/docs/voice.xml",
                       method="POST")

print(member.wait_time)
// 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.DequeueFirstQueueMember("QU5ef8732a3c49700934481addd5ce1659", "http://demo.twilio.com/docs/voice.xml", "POST");
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("Front");
$member->update(array(
        "Url" => "http://demo.twilio.com/docs/voice.xml",
    "Method" => "POST"
    ));
echo $member->wait_time;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("Front")
@member.update(:url => "http://demo.twilio.com/docs/voice.xml",
               :method => "POST")
puts @member.wait_time
// Install the Java helper library from twilio.com/docs/java/install
import java.net.URI;
import java.net.URISyntaxException;

import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.queue.Member;

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 URISyntaxException {
    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
    Member member = Member.updater("QU5ef8732a3c49700934481addd5ce1659", "Front",
        new URI("http://demo.twilio.com/docs/voice.xml"), HttpMethod.POST).update();

    System.out.println(member.getDateEnqueued());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/Front.json \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position" : 0,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>1</Position>
    </QueueMember>
 </TwilioResponse>
待ち行列からメンバーを外す
Loading Code Samples...
言語
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
using Twilio.Http;

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

        const string queueSid = "QU5ef8732a3c49700934481addd5ce1659";
        const string callSid = "CA5ef8732a3c49700934481addd5ce1659";
        var twimlUrl = new Uri("http://demo.twilio.com/docs/voice.xml");
        MemberResource.Update(queueSid,
                              callSid,
                              twimlUrl,
                              HttpMethod.Post);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("CA5ef8732a3c49700934481addd5ce1659")
    ->update(
        "http://demo.twilio.com/docs/voice.xml",
        "POST"
    );

echo $member->position;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').dequeue("http://demo.twilio.com/docs/voice.xml", "CA5ef8732a3c49700934481addd5ce1659", method="POST")
print(member.position)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

# Get all the members in the queue with the given sid
@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('CA5ef8732a3c49700934481addd5ce1659').fetch

@member.update(
  url: 'http://demo.twilio.com/docs/voice.xml',
  method: 'POST'
)

puts @member.position
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("CA5ef8732a3c49700934481addd5ce1659").update({
    url: "http://demo.twilio.com/docs/voice.xml",
    method: "POST"
}, function(err, member) {
    console.log(member.position);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members('CA5ef8732a3c49700934481addd5ce1659')
  .update({
    url: 'http://demo.twilio.com/docs/voice.xml',
    method: 'POST',
  })
  .then((member) => console.log(member.postion));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA5ef8732a3c49700934481addd5ce1659 \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;
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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("CA5ef8732a3c49700934481addd5ce1659");
    // Build a filter for the MemberList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("Url", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("Method", "POST"));
    member.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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("CA5ef8732a3c49700934481addd5ce1659") \
               .update(url="http://demo.twilio.com/docs/voice.xml",
                       method="POST")

print(member.position)
// 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.DequeueQueueMember("QU5ef8732a3c49700934481addd5ce1659", "CA5ef8732a3c49700934481addd5ce1659", "http://demo.twilio.com/docs/voice.xml", "POST");
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("CA5ef8732a3c49700934481addd5ce1659");
$member->update(array(
        "Url" => "http://demo.twilio.com/docs/voice.xml",
    "Method" => "POST"
    ));
echo $member->position;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("CA5ef8732a3c49700934481addd5ce1659")
@member.update(:url => "http://demo.twilio.com/docs/voice.xml",
               :method => "POST")
puts @member.position
// Install the Java helper library from twilio.com/docs/java/install
import java.net.URI;
import java.net.URISyntaxException;

import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.queue.Member;

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 URISyntaxException {
    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
    Member member =
        Member.updater("QU5ef8732a3c49700934481addd5ce1659", "CA5ef8732a3c49700934481addd5ce1659",
            new URI("http://demo.twilio.com/docs/voice.xml"), HttpMethod.POST).update();

    System.out.println(member.getDateEnqueued());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA5ef8732a3c49700934481addd5ce1659.json \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position": 0,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>0</Position>
    </QueueMember>
</TwilioResponse>
通話を待ち行列から外す

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

Members リスト リソース

リソース URI

/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members

HTTP GET

{QueueSid} で識別されるキューの、メンバーのリストを返します。

Loading Code Samples...
言語
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;

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

        var members = MemberResource.Read("QU5ef8732a3c49700934481addd5ce1659");

        foreach (var member in members)
        {
            Console.WriteLine(member.WaitTime);
        }
    }
}
<?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);

$members = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members
    ->read();

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

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

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

@client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
       .members.list.each do |member|
         puts member.position
       end
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members.list(function(err, data) {
    data.queueMembers.forEach(function(member) {
        console.log(member.position);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659').members
  .each((member) => console.log(member.position));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;

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);
    
    MemberList members = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMembers();
    
    // Loop over members and print out a property for each one.
    for (Member member : members) {
      System.out.println(member.getPosition());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

# A list of member objects with the properties described above
members = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
                .members \
                .list()

for member in members:
    print(member.position)
// 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 members = twilio.ListQueueMembers("QU5ef8732a3c49700934481addd5ce1659");
    
    foreach (var member in members.QueueMembers)
    {
      Console.WriteLine(member.WaitTime);
    }
  }
}
<?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 members and echo a property for each one
foreach ($client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members as $member) {
    echo $member->position;
}
# 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 members and print out a property for each one
@client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.list.each do |member|
  puts member.position
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.queue.Member;

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<Member> members = Member.reader("QU5ef8732a3c49700934481addd5ce1659").read();

    // Loop over members and print out a property for each one.
    for (Member member : members) {
      System.out.println(member.getPosition());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "page": 0,
    "page_size": 50,
    "first_page_uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members.json?Page=0&PageSize=50",
    "next_page_uri": null,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members.json",
    "queue_members": [
        {
            "call_sid": "CAxxxxxxxx",
            "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
            "wait_time": 30,
            "position": 1,
            "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members/CAxxxxxxxx.json"
        },
        {
            "call_sid": "CAyyyyyyy",
            "date_enqueued": "Mon, 4 Feb 2012 15:44:30 +0000",
            "wait_time": 45,
            "position": 2,
            "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members/CAyyyyyyy.json"
        }
    ]
}
<TwilioResponse>
    <QueueMembers [paging attributes]>
        <QueueMember>
            <CallSid>CAxxxxxxxx</CallSid>
            <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
            <WaitTime>30</WaitTime>
            <Position>1</Position>
        </QueueMember>
        <QueueMember>
            <CallSid>CAyyyyyyy</CallSid>
            <DateEnqueued>2012-02-04 15:44:30</DateEnqueued>
            <WaitTime>45</WaitTime>
            <Position>2</Position>
        </QueueMember>
    </QueueMembers>
</TwilioResponse>
待ち行列のすべてのメンバーを一覧する

HTTP POST

サポートしません。

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

1 / 1
Loading Code Samples...
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;

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

        var queueMember = MemberResource.Fetch(queueSid, callSid);

        Console.WriteLine(queueMember.WaitTime);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("CA386025c9bf5d6052a1d1ea42b4d16662")
    ->fetch();

echo $member->waitTime;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').get("CA386025c9bf5d6052a1d1ea42b4d16662")
print(member.wait_time)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('CA386025c9bf5d6052a1d1ea42b4d16662').fetch

puts @member.wait_time
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("CA386025c9bf5d6052a1d1ea42b4d16662").get(function(err, member) {
    console.log(member.waitTime);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

const memberSid = 'CA386025c9bf5d6052a1d1ea42b4d16662';

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members(memberSid)
  .fetch()
  .then((member) => console.log(member.waitTime));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA386025c9bf5d6052a1d1ea42b4d16662 \
    -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.Member;

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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("CA386025c9bf5d6052a1d1ea42b4d16662");
    System.out.println(member.getWaitTime());
    
  }
}
# 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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("CA386025c9bf5d6052a1d1ea42b4d16662") \
               .fetch();

print(member.wait_time)
// 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 queueMember = twilio.GetQueueMember("QU5ef8732a3c49700934481addd5ce1659", "CA386025c9bf5d6052a1d1ea42b4d16662");
    
    Console.WriteLine(queueMember.WaitTime);
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("CA386025c9bf5d6052a1d1ea42b4d16662");
echo $member->wait_time;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("CA386025c9bf5d6052a1d1ea42b4d16662")
puts @member.wait_time
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.queue.Member;

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
    Member member =
        Member.fetcher("QU5ef8732a3c49700934481addd5ce1659", "CA386025c9bf5d6052a1d1ea42b4d16662")
            .fetch();

    System.out.println(member.getWaitTime());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position": 1,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>1</Position>
    </QueueMember>
 </TwilioResponse>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
using Twilio.Http;
using System.Linq;

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

        const string queueSid = "QU5ef8732a3c49700934481addd5ce1659";
        const string callSid = "Front";
        var twimlUrl = new Uri("http://demo.twilio.com/docs/voice.xml");

        MemberResource.Update(queueSid,
                              callSid,
                              twimlUrl,
                              HttpMethod.Post);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("Front")
    ->update(
        "http://demo.twilio.com/docs/voice.xml",
        "POST"
    );

echo $member->waitTime;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').dequeue("http://demo.twilio.com/docs/voice.xml", "Front", method="POST")
print(member.wait_time)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('Front').fetch
@member.update(
  url: 'http://demo.twilio.com/docs/voice.xml',
  method: 'POST'
)

puts @member.wait_time
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("Front").update({
    url: "http://demo.twilio.com/docs/voice.xml",
    method: "POST"
}, function(err, member) {
    console.log(member.waitTime);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members('Front')
  .update({
    url: 'http://demo.twilio.com/docs/voice.xml',
    method: 'POST',
  })
  .then((member) => console.log(member.waitTime));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/Front \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;
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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("Front");
    // Build a filter for the MemberList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("Url", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("Method", "POST"));
    member.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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("Front") \
               .update(url="http://demo.twilio.com/docs/voice.xml",
                       method="POST")

print(member.wait_time)
// 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.DequeueFirstQueueMember("QU5ef8732a3c49700934481addd5ce1659", "http://demo.twilio.com/docs/voice.xml", "POST");
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("Front");
$member->update(array(
        "Url" => "http://demo.twilio.com/docs/voice.xml",
    "Method" => "POST"
    ));
echo $member->wait_time;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("Front")
@member.update(:url => "http://demo.twilio.com/docs/voice.xml",
               :method => "POST")
puts @member.wait_time
// Install the Java helper library from twilio.com/docs/java/install
import java.net.URI;
import java.net.URISyntaxException;

import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.queue.Member;

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 URISyntaxException {
    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
    Member member = Member.updater("QU5ef8732a3c49700934481addd5ce1659", "Front",
        new URI("http://demo.twilio.com/docs/voice.xml"), HttpMethod.POST).update();

    System.out.println(member.getDateEnqueued());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/Front.json \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position" : 0,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>1</Position>
    </QueueMember>
 </TwilioResponse>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
using Twilio.Http;

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

        const string queueSid = "QU5ef8732a3c49700934481addd5ce1659";
        const string callSid = "CA5ef8732a3c49700934481addd5ce1659";
        var twimlUrl = new Uri("http://demo.twilio.com/docs/voice.xml");
        MemberResource.Update(queueSid,
                              callSid,
                              twimlUrl,
                              HttpMethod.Post);
    }
}
<?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
$member = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members("CA5ef8732a3c49700934481addd5ce1659")
    ->update(
        "http://demo.twilio.com/docs/voice.xml",
        "POST"
    );

echo $member->position;
# 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)

member = client.members('QU5ef8732a3c49700934481addd5ce1659').dequeue("http://demo.twilio.com/docs/voice.xml", "CA5ef8732a3c49700934481addd5ce1659", method="POST")
print(member.position)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

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

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

# Get all the members in the queue with the given sid
@member = @client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
                 .members('CA5ef8732a3c49700934481addd5ce1659').fetch

@member.update(
  url: 'http://demo.twilio.com/docs/voice.xml',
  method: 'POST'
)

puts @member.position
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members("CA5ef8732a3c49700934481addd5ce1659").update({
    url: "http://demo.twilio.com/docs/voice.xml",
    method: "POST"
}, function(err, member) {
    console.log(member.position);
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659')
  .members('CA5ef8732a3c49700934481addd5ce1659')
  .update({
    url: 'http://demo.twilio.com/docs/voice.xml',
    method: 'POST',
  })
  .then((member) => console.log(member.postion));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA5ef8732a3c49700934481addd5ce1659 \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;
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
    Member member = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMember("CA5ef8732a3c49700934481addd5ce1659");
    // Build a filter for the MemberList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("Url", "http://demo.twilio.com/docs/voice.xml"));
    params.add(new BasicNameValuePair("Method", "POST"));
    member.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)

member = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
               .members("CA5ef8732a3c49700934481addd5ce1659") \
               .update(url="http://demo.twilio.com/docs/voice.xml",
                       method="POST")

print(member.position)
// 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.DequeueQueueMember("QU5ef8732a3c49700934481addd5ce1659", "CA5ef8732a3c49700934481addd5ce1659", "http://demo.twilio.com/docs/voice.xml", "POST");
  }
}
<?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
$member = $client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members->get("CA5ef8732a3c49700934481addd5ce1659");
$member->update(array(
        "Url" => "http://demo.twilio.com/docs/voice.xml",
    "Method" => "POST"
    ));
echo $member->position;
# 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
@member = @client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.get("CA5ef8732a3c49700934481addd5ce1659")
@member.update(:url => "http://demo.twilio.com/docs/voice.xml",
               :method => "POST")
puts @member.position
// Install the Java helper library from twilio.com/docs/java/install
import java.net.URI;
import java.net.URISyntaxException;

import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.queue.Member;

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 URISyntaxException {
    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
    Member member =
        Member.updater("QU5ef8732a3c49700934481addd5ce1659", "CA5ef8732a3c49700934481addd5ce1659",
            new URI("http://demo.twilio.com/docs/voice.xml"), HttpMethod.POST).update();

    System.out.println(member.getDateEnqueued());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members/CA5ef8732a3c49700934481addd5ce1659.json \
    -d "Url=http://demo.twilio.com/docs/voice.xml" \
    -d "Method=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "call_sid": "CA386025c9bf5d6052a1d1ea42b4d16662",
    "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
    "wait_time": 30,
    "position": 0,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxxx/Members/CA386025c9bf5d6052a1d1ea42b4d16662.json"
}
<TwilioResponse>
    <QueueMember>
        <CallSid>CAxxxxxxxx</CallSid>
        <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
        <WaitTime>30</WaitTime>
        <Position>0</Position>
    </QueueMember>
</TwilioResponse>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;

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

        var members = MemberResource.Read("QU5ef8732a3c49700934481addd5ce1659");

        foreach (var member in members)
        {
            Console.WriteLine(member.WaitTime);
        }
    }
}
<?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);

$members = $client
    ->queues("QU5ef8732a3c49700934481addd5ce1659")
    ->members
    ->read();

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

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

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

@client.account.queues('QU5ef8732a3c49700934481addd5ce1659')
       .members.list.each do |member|
         puts member.position
       end
// 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.queues('QU5ef8732a3c49700934481addd5ce1659').members.list(function(err, data) {
    data.queueMembers.forEach(function(member) {
        console.log(member.position);
    });
});
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.queues('QU5ef8732a3c49700934481addd5ce1659').members
  .each((member) => console.log(member.position));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members \
    -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.Member;
import com.twilio.sdk.resource.list.MemberList;

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);
    
    MemberList members = client.getAccount().getQueue("QU5ef8732a3c49700934481addd5ce1659").getMembers();
    
    // Loop over members and print out a property for each one.
    for (Member member : members) {
      System.out.println(member.getPosition());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

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

# A list of member objects with the properties described above
members = client.queues("QU5ef8732a3c49700934481addd5ce1659") \
                .members \
                .list()

for member in members:
    print(member.position)
// 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 members = twilio.ListQueueMembers("QU5ef8732a3c49700934481addd5ce1659");
    
    foreach (var member in members.QueueMembers)
    {
      Console.WriteLine(member.WaitTime);
    }
  }
}
<?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 members and echo a property for each one
foreach ($client->account->queues->get('QU5ef8732a3c49700934481addd5ce1659')->members as $member) {
    echo $member->position;
}
# 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 members and print out a property for each one
@client.account.queues.get('QU5ef8732a3c49700934481addd5ce1659').members.list.each do |member|
  puts member.position
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.queue.Member;

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<Member> members = Member.reader("QU5ef8732a3c49700934481addd5ce1659").read();

    // Loop over members and print out a property for each one.
    for (Member member : members) {
      System.out.println(member.getPosition());
    }
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Queues/QU5ef8732a3c49700934481addd5ce1659/Members.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "page": 0,
    "page_size": 50,
    "first_page_uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members.json?Page=0&PageSize=50",
    "next_page_uri": null,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members.json",
    "queue_members": [
        {
            "call_sid": "CAxxxxxxxx",
            "date_enqueued": "Mon, 4 Feb 2012 15:44:15 +0000",
            "wait_time": 30,
            "position": 1,
            "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members/CAxxxxxxxx.json"
        },
        {
            "call_sid": "CAyyyyyyy",
            "date_enqueued": "Mon, 4 Feb 2012 15:44:30 +0000",
            "wait_time": 45,
            "position": 2,
            "uri": "/2010-04-01/Accounts/AC5ef87.../Queues/QUxxxxxxxx/Members/CAyyyyyyy.json"
        }
    ]
}
<TwilioResponse>
    <QueueMembers [paging attributes]>
        <QueueMember>
            <CallSid>CAxxxxxxxx</CallSid>
            <DateEnqueued>2012-02-04 15:44:15</DateEnqueued>
            <WaitTime>30</WaitTime>
            <Position>1</Position>
        </QueueMember>
        <QueueMember>
            <CallSid>CAyyyyyyy</CallSid>
            <DateEnqueued>2012-02-04 15:44:30</DateEnqueued>
            <WaitTime>45</WaitTime>
            <Position>2</Position>
        </QueueMember>
    </QueueMembers>
</TwilioResponse>