# Available Add-ons Extensions Subresource

> \[!WARNING]
>
> The Preview API for this resource is deprecated. To migrate from Preview to V1, refer to the Marketplace API migration guide for [users](/docs/marketplace/listings/api-migration-users) or [publishers](/docs/marketplace/publishers/api-migration-publishers).

This subresource of the [Available Add-ons resource](/docs/marketplace/api/available-add-ons) allows users to fetch an Extension or view a list of Extensions associated with an Available Add-on Listing. An Extension describes the specific feature or API endpoint of a Twilio product in which an Add-on Listing can be used.

> \[!NOTE]
>
> This API only supports Add-on Listings that are in General Availability (GA) or Beta state. Listings that are labeled as Coming Soon or Developer Preview are not accessible via the API and must be managed in the Console.

## Extension Properties

```json
{"type":"object","refName":"marketplace.v1.available_add_on.available_add_on_extension","modelName":"marketplace_v1_available_add_on_available_add_on_extension","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XF[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the AvailableAddOnExtension resource."},"available_add_on_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XB[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the AvailableAddOn resource to which this extension applies."},"friendly_name":{"type":"string","nullable":true,"description":"The string that you assigned to describe the resource."},"product_name":{"type":"string","nullable":true,"description":"The name of the Product this Extension is used within."},"unique_name":{"type":"string","nullable":true,"description":"An application-defined string that uniquely identifies the resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the resource."}}}
```

## Fetch an instance of an Extension for the Available Add-on.

`GET https://marketplace.twilio.com/v1/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid}`

### Path parameters

```json
[{"name":"AvailableAddOnSid","in":"path","description":"The SID of the AvailableAddOn resource with the extension to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XB[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the AvailableAddOn Extension resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XF[0-9a-fA-F]{32}$"},"required":true}]
```

This endpoint returns details on a given Extension associated with a given Available Add-on.

Fetch an Extension

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchAvailableAddOnExtension() {
  const extension = await client.marketplace.v1
    .availableAddOns("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(extension.sid);
}

fetchAvailableAddOnExtension();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

extension = (
    client.marketplace.v1.available_add_ons(
        "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch()
)

print(extension.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1.AvailableAddOn;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var availableAddOnExtension = await AvailableAddOnExtensionResource.FetchAsync(
            pathAvailableAddOnSid: "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(availableAddOnExtension.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.availableaddon.AvailableAddOnExtension;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        AvailableAddOnExtension availableAddOnExtension =
            AvailableAddOnExtension.fetcher("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                .fetch();

        System.out.println(availableAddOnExtension.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.MarketplaceV1.FetchAvailableAddOnExtension("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?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;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$extension = $twilio->marketplace->v1
    ->availableAddOns("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $extension->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

extension = @client
            .marketplace
            .v1
            .available_add_ons('XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .extensions('XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .fetch

puts extension.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:available-add-ons:extensions:fetch \
   --available-add-on-sid XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "available_add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Incoming Voice Call",
  "product_name": "Programmable Voice",
  "unique_name": "voice-incoming",
  "url": "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Retrieve a list of Extensions for the Available Add-on.

`GET https://marketplace.twilio.com/v1/AvailableAddOns/{AvailableAddOnSid}/Extensions`

### Path parameters

```json
[{"name":"AvailableAddOnSid","in":"path","description":"The SID of the AvailableAddOn resource with the extensions to read.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XB[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

This endpoint returns all Extensions associated with a given Available Add-on.

List multiple Extensions

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listAvailableAddOnExtension() {
  const extensions = await client.marketplace.v1
    .availableAddOns("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .extensions.list({ limit: 20 });

  extensions.forEach((e) => console.log(e.sid));
}

listAvailableAddOnExtension();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

extensions = client.marketplace.v1.available_add_ons(
    "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).extensions.list(limit=20)

for record in extensions:
    print(record.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1.AvailableAddOn;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var availableAddOnExtensions = await AvailableAddOnExtensionResource.ReadAsync(
            pathAvailableAddOnSid: "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", limit: 20);

        foreach (var record in availableAddOnExtensions) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.availableaddon.AvailableAddOnExtension;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<AvailableAddOnExtension> availableAddOnExtensions =
            AvailableAddOnExtension.reader("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").limit(20).read();

        for (AvailableAddOnExtension record : availableAddOnExtensions) {
            System.out.println(record.getSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	marketplace "github.com/twilio/twilio-go/rest/marketplace/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &marketplace.ListAvailableAddOnExtensionParams{}
	params.SetLimit(20)

	resp, err := client.MarketplaceV1.ListAvailableAddOnExtension("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```php
<?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;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$extensions = $twilio->marketplace->v1
    ->availableAddOns("XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->extensions->read(20);

foreach ($extensions as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

extensions = @client
             .marketplace
             .v1
             .available_add_ons('XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
             .extensions
             .list(limit: 20)

extensions.each do |record|
   puts record.sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:available-add-ons:extensions:list \
   --available-add-on-sid XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "extensions": [
    {
      "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "available_add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "friendly_name": "Incoming Voice Call",
      "product_name": "Programmable Voice",
      "unique_name": "voice-incoming",
      "url": "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://marketplace.twilio.com/v1/AvailableAddOns/XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  }
}
```
