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

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

// Automatically fetches more pages as needed.
for await (const oauthClient of client.oauthClients.list()) {
  console.log(oauthClient.client_id);
}
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.oauth_clients.list()
page = page.data[0]
print(page.client_id)
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"),
)
page, err := client.OAuthClients.List(context.TODO(), telnyx.OAuthClientListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.oauthclients.OAuthClientListPage;
import com.telnyx.sdk.models.oauthclients.OAuthClientListParams;

public final class Main {
private Main() {}

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

OAuthClientListPage page = client.oauthClients().list();
}
}
require "telnyx"

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

page = telnyx.oauth_clients.list

puts(page)
<?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 {
$page = $client->oauthClients->list(
filterAllowedGrantTypesContains: 'client_credentials',
filterClientID: 'filter[client_id]',
filterClientType: 'confidential',
filterName: 'filter[name]',
filterNameContains: 'filter[name][contains]',
filterVerified: true,
pageNumber: 1,
pageSize: 1,
);

var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx oauth-clients list \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/v2/oauth/clients \
--header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "record_type": "oauth_client",
      "client_id": "<string>",
      "name": "<string>",
      "org_id": "<string>",
      "user_id": "<string>",
      "require_pkce": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "allowed_scopes": [
        "<string>"
      ],
      "allowed_grant_types": [],
      "redirect_uris": [
        "<string>"
      ],
      "logo_uri": "<string>",
      "tos_uri": "<string>",
      "policy_uri": "<string>",
      "client_secret": "<string>"
    }
  ],
  "meta": {
    "page_number": 123,
    "page_size": 123,
    "total_results": 123,
    "total_pages": 123
  }
}
{
"error": "<string>",
"error_description": "<string>"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

page[size]
integer
default:20

Number of results per page

Required range: 1 <= x <= 100
page[number]
integer
default:1

Page number

Required range: x >= 1
filter[client_type]
enum<string>

Filter by client type

Available options:
confidential,
public
filter[verified]
boolean

Filter by verification status

filter[allowed_grant_types][contains]
enum<string>

Filter by allowed grant type

Available options:
client_credentials,
authorization_code,
refresh_token
filter[name]
string

Filter by exact client name

filter[name][contains]
string

Filter by client name containing text

filter[client_id]
string

Filter by client ID

Response

List of OAuth clients

data
object[]
meta
object