List OAuth clients
Retrieve a paginated list of OAuth clients for the authenticated user
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of results per page
Required range:
1 <= x <= 100Page number
Required range:
x >= 1Filter by client type
Available options:
confidential, public Filter by verification status
Filter by allowed grant type
Available options:
client_credentials, authorization_code, refresh_token Filter by exact client name
Filter by client name containing text
Filter by client ID
Was this page helpful?
⌘I
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>"
}