REST API: ConnectApp

ConnectApps リスト リソースは、Twilio アカウント内 で作成したすべての ConnectApp を返します。 インスタンス リソースは、ConnectApp の情報と、ConnectApp を許可する利用者が要求されるパーミッションを返します。

ConnectApp インスタンス リソース

リソースURI

/2010-04-01/Accounts/{AccountSid}/ConnectApps/{ConnectAppSid}

リソースのプロパティ

名前 概要
account_sid

The unique id of the Account that created this ConnectApp. (🏢 not PII)

authorize_redirect_url

The URL the user's browser will redirect to after Twilio authenticates the user and obtains authorization for this Connect App. (📇 PII MTL: 30 days)

company_name

The company name set for this Connect App. (📇 PII MTL: 30 days)

date_created

The date that this resource was created, given as GMT RFC 2822 format. (🏢 not PII)

date_updated

The date that this resource was last updated, given as GMT RFC 2822 format. (🏢 not PII)

deauthorize_callback_method

The HTTP method to be used when making a request to the DeauthorizeCallbackUrl. (🏢 not PII)

deauthorize_callback_url

The URL to which Twilio will send a request when a user de-authorizes this Connect App. (📇 PII MTL: 30 days)

description

A more detailed human readable description of the Connect App. (📇 PII MTL: 30 days)

friendly_name

A human readable name for the Connect App. (📇 PII MTL: 30 days)

homepage_url

The public URL where users can obtain more information about this Connect App. (📇 PII MTL: 30 days)

permissions

The set of permissions that your ConnectApp requests. (🏢 not PII)

sid

The unique id of this Connect App. (🏢 not PII)

uri

The URI for this resource, relative to https://api.twilio.com. (🏢 not PII)

HTTP GET

ConnectApp のプロパティを取得します。

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

client
  .connectApps('CNb989fdd207b04d16aee578018ef5fd93')
  .get((err, connectApp) => {
    console.log(connectApp.homepageUrl);
  });
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.connectApps('CNb989fdd207b04d16aee578018ef5fd93')
      .fetch()
      .then(connect_app => console.log(connect_app.companyName))
      .done();
// 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 connectApp = twilio.GetConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    
    Console.WriteLine(connectApp.HomepageUrl);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

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

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
connect_app = client.account.connect_apps
                    .get('CNb989fdd207b04d16aee578018ef5fd93')
puts connect_app.homepage_url
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;


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

        TwilioClient.Init(accountSid, authToken);

        var connectApp = ConnectAppResource.Fetch(
            pathAccountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "CNb989fdd207b04d16aee578018ef5fd93"
        );

        Console.WriteLine(connectApp.CompanyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

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

$connect_app = $twilio->connectApps("CNb989fdd207b04d16aee578018ef5fd93")
                      ->fetch();

print($connect_app->companyName);
# 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)

connect_app = client.connect_apps.get("CNb989fdd207b04d16aee578018ef5fd93")
print(connect_app.homepage_url)
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

connect_app = @client.connect_apps('CNb989fdd207b04d16aee578018ef5fd93').fetch

puts connect_app.company_name
// 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.ConnectApp;

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
    ConnectApp connectApp = client.getAccount().getConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    System.out.println(connectApp.getHomepageUrl());
    
  }
}
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

connect_app = client.connect_apps('CNb989fdd207b04d16aee578018ef5fd93').fetch()

print(connect_app.company_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.ConnectApp;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        ConnectApp connectApp = 
            ConnectApp.fetcher("CNb989fdd207b04d16aee578018ef5fd93")
            .fetch();

        System.out.println(connectApp.getCompanyName());
    }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -X GET 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93.json' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "authorize_redirect_url": "http://example.com/redirect",
  "company_name": "Twilio",
  "deauthorize_callback_method": "GET",
  "deauthorize_callback_url": "http://example.com/deauth",
  "description": null,
  "friendly_name": "Connect app for deletion",
  "homepage_url": "http://example.com/home",
  "permissions": [],
  "sid": "CNb989fdd207b04d16aee578018ef5fd93",
  "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93.json"
}
<ConnectApp>
	<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
	<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
	<FriendlyName>My awesome ConnectApp</FriendlyName>
	<Description>An amazing TwilioConnect application that does amazing things!</Description>
	<CompanyName>My Company</CompanyName>
	<HomepageUrl>http://www.mycompany.com</HomepageUrl>
	<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
	<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
	<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
	<Permissions>
		<Permission>get-all</Permission>
		<Permission>post-all</Permission>
	</Permissions>
</ConnectApp>
接続Appを取得する

HTTP POST

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

オプションパラメーター

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

名前 概要
AuthorizeRedirectUrl

Optional. The URL the user's browser will redirect to after Twilio authenticates the user and obtains authorization for this Connect App. (📇 PII MTL: 30 days)

会社名

Optional. The company name set for this Connect App. (📇 PII MTL: 30 days)

DeauthorizeCallbackMethod

Optional. The HTTP method to be used when making a request to the DeauthorizeCallbackUrl. Either GET or POST. (🏢 not PII)

DeauthorizeCallbackUrl

Optional. The URL to which Twilio will send a request when a user de-authorizes this Connect App. (📇 PII MTL: 30 days)

概要

Optional. A more detailed human readable description of the Connect App. (📇 PII MTL: 30 days)

FriendlyName

Optional. A human readable description of the Connect App, with maximum length 64 characters. (📇 PII MTL: 30 days)

ホームページURL

Optional. The public URL where users can obtain more information about this Connect App. (📇 PII MTL: 30 days)

パーミッション

Optional. A comma-separated list of permssions you will request from users of this ConnectApp. Valid permssions are get-all or post-all. (🏢 not PII)

HTTP PUT

サポートされていません。

HTTP DELETE

サポートされていません。

ConnectApps リスト リソース

リソースURI

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

HTTP GET

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

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

client.connectApps.list((err, data) => {
  data.connectApps.forEach(connectApp => {
    console.log(connectApp.FriendlyName);
  });
});
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.connectApps.each(connectApps => console.log(connectApps.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 connectApps = twilio.ListConnectApps(null, null);
    
    foreach (var connectApp in connectApps.ConnectApps)
    {
      Console.WriteLine(connectApp.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

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

// Loop over the list of connect_apps and echo a property for each one
foreach ($client->account->connect_apps as $connect_app) {
    echo $connect_app->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 connect_apps and print out a property for each one
@client.account.connect_apps.list.each do |connect_app|
  puts connect_app.friendly_name
end
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;


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

        TwilioClient.Init(accountSid, authToken);

        var connectApps = ConnectAppResource.Read(
            pathAccountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        foreach(var record in connectApps)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

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

$connectApps = $twilio->connectApps
                      ->read();

foreach ($connectApps as $record) {
    print($record->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)

# A list of connect_app objects with the properties described above
connect_apps = client.connect_apps.list()
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

connect_apps = @client.connect_apps.list

connect_apps.each do |record|
  puts record.sid
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.ConnectApp;
import com.twilio.sdk.resource.list.ConnectAppList;

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

    
    
    ConnectAppList connectApps = client.getAccount().getConnectApps();
    
    // Loop over connectApps and print out a property for each one.
    for (ConnectApp connectApp : connectApps) {
      System.out.println(connectApp.getFriendlyName());
    }
    
  }
}
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

connect_apps = client.connect_apps.list()

for record in connect_apps:
    print(record.sid)
// 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.ConnectApp;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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<ConnectApp> connectApps = ConnectApp.reader().read();

        for(ConnectApp record : connectApps) {
            System.out.println(record.getSid());
        }
    }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -X GET 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "connect_apps": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "authorize_redirect_url": "http://example.com/redirect",
      "company_name": "Twilio",
      "deauthorize_callback_method": "GET",
      "deauthorize_callback_url": "http://example.com/deauth",
      "description": null,
      "friendly_name": "Connect app for deletion",
      "homepage_url": "http://example.com/home",
      "permissions": [],
      "sid": "CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
    }
  ],
  "end": 0,
  "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json?Page=0&PageSize=50",
  "last_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json?Page=0&PageSize=50",
  "next_page_uri": null,
  "num_pages": 1,
  "page": 0,
  "page_size": 50,
  "previous_page_uri": null,
  "start": 0,
  "total": 1,
  "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json",
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
<TwilioResponse>
	<ConnectApps page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<ConnectApp>
			<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>My awesome ConnectApp</FriendlyName>
			<Description>An amazing TwilioConnect application that does amazing things!</Description>
			<CompanyName>My Company</CompanyName>
			<HomepageUrl>http://www.mycompany.com</HomepageUrl>
			<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
			<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
			<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
			<Permissions>
				<Permission>get-all</Permission>
				<Permission>post-all</Permission>
			</Permissions>
		</ConnectApp>
	</ConnectApps>
</TwilioResponse>
すべての接続Appを取得する

HTTP POST

サポートしません。

HTTP PUT

サポートしません。

HTTP DELETE

サポートしません。

ヘルプが必要ですか?

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

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

client
  .connectApps('CNb989fdd207b04d16aee578018ef5fd93')
  .get((err, connectApp) => {
    console.log(connectApp.homepageUrl);
  });
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.connectApps('CNb989fdd207b04d16aee578018ef5fd93')
      .fetch()
      .then(connect_app => console.log(connect_app.companyName))
      .done();
// 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 connectApp = twilio.GetConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    
    Console.WriteLine(connectApp.HomepageUrl);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

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

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

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

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
connect_app = client.account.connect_apps
                    .get('CNb989fdd207b04d16aee578018ef5fd93')
puts connect_app.homepage_url
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;


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

        TwilioClient.Init(accountSid, authToken);

        var connectApp = ConnectAppResource.Fetch(
            pathAccountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "CNb989fdd207b04d16aee578018ef5fd93"
        );

        Console.WriteLine(connectApp.CompanyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

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

$connect_app = $twilio->connectApps("CNb989fdd207b04d16aee578018ef5fd93")
                      ->fetch();

print($connect_app->companyName);
# 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)

connect_app = client.connect_apps.get("CNb989fdd207b04d16aee578018ef5fd93")
print(connect_app.homepage_url)
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

connect_app = @client.connect_apps('CNb989fdd207b04d16aee578018ef5fd93').fetch

puts connect_app.company_name
// 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.ConnectApp;

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
    ConnectApp connectApp = client.getAccount().getConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    System.out.println(connectApp.getHomepageUrl());
    
  }
}
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

connect_app = client.connect_apps('CNb989fdd207b04d16aee578018ef5fd93').fetch()

print(connect_app.company_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.ConnectApp;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        ConnectApp connectApp = 
            ConnectApp.fetcher("CNb989fdd207b04d16aee578018ef5fd93")
            .fetch();

        System.out.println(connectApp.getCompanyName());
    }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -X GET 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93.json' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "authorize_redirect_url": "http://example.com/redirect",
  "company_name": "Twilio",
  "deauthorize_callback_method": "GET",
  "deauthorize_callback_url": "http://example.com/deauth",
  "description": null,
  "friendly_name": "Connect app for deletion",
  "homepage_url": "http://example.com/home",
  "permissions": [],
  "sid": "CNb989fdd207b04d16aee578018ef5fd93",
  "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93.json"
}
<ConnectApp>
	<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
	<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
	<FriendlyName>My awesome ConnectApp</FriendlyName>
	<Description>An amazing TwilioConnect application that does amazing things!</Description>
	<CompanyName>My Company</CompanyName>
	<HomepageUrl>http://www.mycompany.com</HomepageUrl>
	<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
	<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
	<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
	<Permissions>
		<Permission>get-all</Permission>
		<Permission>post-all</Permission>
	</Permissions>
</ConnectApp>
SDKバージョン:
  • 4.x
  • 5.x
レスポンス形式:
  • JSON
  • xml
SDKバージョン:
  • 6.x
  • 7.x
SDKバージョン:
  • 2.x
  • 3.x
SDKバージョン:
  • 4.x
  • 5.x
SDKバージョン:
  • 5.x
  • 6.x
SDKバージョン:
  • 4.x
  • 5.x
形式:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.connectApps.list((err, data) => {
  data.connectApps.forEach(connectApp => {
    console.log(connectApp.FriendlyName);
  });
});
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.connectApps.each(connectApps => console.log(connectApps.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 connectApps = twilio.ListConnectApps(null, null);
    
    foreach (var connectApp in connectApps.ConnectApps)
    {
      Console.WriteLine(connectApp.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

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

// Loop over the list of connect_apps and echo a property for each one
foreach ($client->account->connect_apps as $connect_app) {
    echo $connect_app->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 connect_apps and print out a property for each one
@client.account.connect_apps.list.each do |connect_app|
  puts connect_app.friendly_name
end
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;


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

        TwilioClient.Init(accountSid, authToken);

        var connectApps = ConnectAppResource.Read(
            pathAccountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        foreach(var record in connectApps)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

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

$connectApps = $twilio->connectApps
                      ->read();

foreach ($connectApps as $record) {
    print($record->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)

# A list of connect_app objects with the properties described above
connect_apps = client.connect_apps.list()
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

connect_apps = @client.connect_apps.list

connect_apps.each do |record|
  puts record.sid
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.ConnectApp;
import com.twilio.sdk.resource.list.ConnectAppList;

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

    
    
    ConnectAppList connectApps = client.getAccount().getConnectApps();
    
    // Loop over connectApps and print out a property for each one.
    for (ConnectApp connectApp : connectApps) {
      System.out.println(connectApp.getFriendlyName());
    }
    
  }
}
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

connect_apps = client.connect_apps.list()

for record in connect_apps:
    print(record.sid)
// 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.ConnectApp;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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<ConnectApp> connectApps = ConnectApp.reader().read();

        for(ConnectApp record : connectApps) {
            System.out.println(record.getSid());
        }
    }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -X GET 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "connect_apps": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "authorize_redirect_url": "http://example.com/redirect",
      "company_name": "Twilio",
      "deauthorize_callback_method": "GET",
      "deauthorize_callback_url": "http://example.com/deauth",
      "description": null,
      "friendly_name": "Connect app for deletion",
      "homepage_url": "http://example.com/home",
      "permissions": [],
      "sid": "CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
    }
  ],
  "end": 0,
  "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json?Page=0&PageSize=50",
  "last_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json?Page=0&PageSize=50",
  "next_page_uri": null,
  "num_pages": 1,
  "page": 0,
  "page_size": 50,
  "previous_page_uri": null,
  "start": 0,
  "total": 1,
  "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json",
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
<TwilioResponse>
	<ConnectApps page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<ConnectApp>
			<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>My awesome ConnectApp</FriendlyName>
			<Description>An amazing TwilioConnect application that does amazing things!</Description>
			<CompanyName>My Company</CompanyName>
			<HomepageUrl>http://www.mycompany.com</HomepageUrl>
			<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
			<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
			<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
			<Permissions>
				<Permission>get-all</Permission>
				<Permission>post-all</Permission>
			</Permissions>
		</ConnectApp>
	</ConnectApps>
</TwilioResponse>