Get User Bundle Resources
Retrieves the resources of a user bundle by its ID.
GET
/
bundle_pricing
/
user_bundles
/
{user_bundle_id}
/
resources
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.bundlePricing.userBundles.listResources(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
);
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.bundle_pricing.user_bundles.list_resources(
user_bundle_id="ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.BundlePricing.UserBundles.ListResources(
context.TODO(),
"ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
telnyx.BundlePricingUserBundleListResourcesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListResourcesParams;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListResourcesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserBundleListResourcesResponse response = client.bundlePricing().userBundles().listResources("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.bundle_pricing.user_bundles.list_resources("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->bundlePricing->userBundles->listResources(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
authorizationBearer: 'authorization_bearer',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:user-bundles list-resources \
--api-key 'My API Key' \
--user-bundle-id ca1d2263-d1f1-43ac-ba53-248e7a4bb26acurl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/user_bundles/{user_bundle_id}/resources \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
"resource": "+15617819942",
"resource_type": "number",
"created_at": "2025-01-20",
"updated_at": "2025-01-20"
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}Authorizations
Headers
Path Parameters
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.bundlePricing.userBundles.listResources(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
);
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.bundle_pricing.user_bundles.list_resources(
user_bundle_id="ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.BundlePricing.UserBundles.ListResources(
context.TODO(),
"ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
telnyx.BundlePricingUserBundleListResourcesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListResourcesParams;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListResourcesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserBundleListResourcesResponse response = client.bundlePricing().userBundles().listResources("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.bundle_pricing.user_bundles.list_resources("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->bundlePricing->userBundles->listResources(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
authorizationBearer: 'authorization_bearer',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:user-bundles list-resources \
--api-key 'My API Key' \
--user-bundle-id ca1d2263-d1f1-43ac-ba53-248e7a4bb26acurl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/user_bundles/{user_bundle_id}/resources \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
"resource": "+15617819942",
"resource_type": "number",
"created_at": "2025-01-20",
"updated_at": "2025-01-20"
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}