Skip to main content
GET
/
user_tags
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const userTags = await client.userTags.list();

console.log(userTags.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
)
user_tags = client.user_tags.list()
print(user_tags.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"),
)
userTags, err := client.UserTags.List(context.TODO(), telnyx.UserTagListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userTags.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.usertags.UserTagListParams;
import com.telnyx.sdk.models.usertags.UserTagListResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

UserTagListResponse userTags = client.userTags().list();
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

user_tags = telnyx.user_tags.list

puts(user_tags)
<?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 {
$userTags = $client->userTags->list(filter: ['startsWith' => 'my-tag']);

var_dump($userTags);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx user-tags list \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/v2/user_tags \
--header 'Authorization: Bearer <token>'
{
  "data": {
    "outbound_profile_tags": [
      "my-tag"
    ],
    "number_tags": [
      "my-tag"
    ]
  }
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[starts_with]

Response

A list of your tags

data
object