# Recording Add-on Results Payloads Data Subresource

This subresource of the [Recording Add-on Results Payloads subresource](/docs/marketplace/api/recording-add-on-results-payloads) allows Recording Add-on Listing users to fetch or list the Data associated with a specific Recording Add-on Result Payload. The response includes a 307 redirect to a signed URL where the Data can be downloaded.

> \[!WARNING]
>
> The retention period for Recording Add-on Results is 30 days, after which they cannot be accessed.

## Data Properties

```json
{"type":"object","refName":"api.v2010.account.recording.recording_add_on_result.recording_add_on_result_payload.recording_add_on_result_payload_data","modelName":"api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload_recording_add_on_result_payload_data","properties":{"redirect_to":{"type":"string","format":"uri","nullable":true,"description":"The URL to redirect to to get the data returned by the AddOn that was previously stored."}}}
```

## Fetch Data

`GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{PayloadSid}/Data.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The SID of the [Account](/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"ReferenceSid","in":"path","description":"The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RE[0-9a-fA-F]{32}$"},"required":true},{"name":"AddOnResultSid","in":"path","description":"The SID of the AddOnResult to which the payload to fetch belongs.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XR[0-9a-fA-F]{32}$"},"required":true},{"name":"PayloadSid","in":"path","description":"The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XH[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch a Datum

```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 fetchRecordingAddOnResultPayloadData() {
  const data = await client
    .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .data()
    .fetch();

  console.log(data.redirectTo);
}

fetchRecordingAddOnResultPayloadData();
```

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

data = (
    client.recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .add_on_results("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .data()
    .fetch()
)

print(data.redirect_to)
```

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

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Recording.AddOnResult.Payload;
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 data = await DataResource.FetchAsync(
            pathReferenceSid: "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathAddOnResultSid: "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathPayloadSid: "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(data.RedirectTo);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.recording.addonresult.payload.Data;

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);
        Data data = Data.fetcher("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                            "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                            "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                        .fetch();

        System.out.println(data.getRedirectTo());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"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 := &api.FetchRecordingAddOnResultPayloadDataParams{}

	resp, err := client.Api.FetchRecordingAddOnResultPayloadData("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.RedirectTo != nil {
			fmt.Println(*resp.RedirectTo)
		} else {
			fmt.Println(resp.RedirectTo)
		}
	}
}
```

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

$data = $twilio
    ->recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->data()
    ->fetch();

print $data->redirectTo;
```

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

data = @client
       .api
       .v2010
       .recordings('REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .add_on_results('XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .payloads('XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .data
       .fetch

puts data.redirect_to
```

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

twilio api:core:recordings:add-on-results:payloads:data:fetch \
   --reference-sid REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --add-on-result-sid XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --payload-sid XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads/XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Data.json" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "redirect_to": "http://example.com"
}
```

## List all Data

`GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{PayloadSid}/Data.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The SID of the [Account](/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"ReferenceSid","in":"path","description":"The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RE[0-9a-fA-F]{32}$"},"required":true},{"name":"AddOnResultSid","in":"path","description":"The SID of the AddOnResult to which the payload to fetch belongs.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XR[0-9a-fA-F]{32}$"},"required":true},{"name":"PayloadSid","in":"path","description":"The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XH[0-9a-fA-F]{32}$"},"required":true}]
```

List multiple Datums

```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 fetchRecordingAddOnResultPayloadData() {
  const data = await client
    .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .data()
    .fetch();

  console.log(data.redirectTo);
}

fetchRecordingAddOnResultPayloadData();
```

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

data = (
    client.recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .add_on_results("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .data()
    .fetch()
)

print(data.redirect_to)
```

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

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Recording.AddOnResult.Payload;
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 data = await DataResource.FetchAsync(
            pathReferenceSid: "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathAddOnResultSid: "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathPayloadSid: "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(data.RedirectTo);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.recording.addonresult.payload.Data;

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);
        Data data = Data.fetcher("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                            "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                            "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                        .fetch();

        System.out.println(data.getRedirectTo());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"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 := &api.FetchRecordingAddOnResultPayloadDataParams{}

	resp, err := client.Api.FetchRecordingAddOnResultPayloadData("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.RedirectTo != nil {
			fmt.Println(*resp.RedirectTo)
		} else {
			fmt.Println(resp.RedirectTo)
		}
	}
}
```

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

$data = $twilio
    ->recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->data()
    ->fetch();

print $data->redirectTo;
```

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

data = @client
       .api
       .v2010
       .recordings('REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .add_on_results('XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .payloads('XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
       .data
       .fetch

puts data.redirect_to
```

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

twilio api:core:recordings:add-on-results:payloads:data:fetch \
   --reference-sid REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --add-on-result-sid XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --payload-sid XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads/XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Data.json" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "redirect_to": "http://example.com"
}
```
