Update OAuth client
Update an existing OAuth client
PUT
/
oauth
/
clients
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const oauthClient = await client.oauthClients.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(oauthClient.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
)
oauth_client = client.oauth_clients.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(oauth_client.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"),
)
oauthClient, err := client.OAuthClients.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.OAuthClientUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", oauthClient.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.oauthclients.OAuthClientUpdateParams;
import com.telnyx.sdk.models.oauthclients.OAuthClientUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
OAuthClientUpdateResponse oauthClient = client.oauthClients().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
oauth_client = telnyx.oauth_clients.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(oauth_client)<?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 {
$oauthClient = $client->oauthClients->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
allowedGrantTypes: ['client_credentials'],
allowedScopes: ['admin'],
logoUri: 'https://example.com',
name: 'name',
policyUri: 'https://example.com',
redirectUris: ['https://example.com'],
requirePkce: true,
tosUri: 'https://example.com',
);
var_dump($oauthClient);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx oauth-clients update \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request PUT \
--url https://api.telnyx.com/v2/oauth/clients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowed_scopes": [
"admin"
],
"require_pkce": true,
"allowed_grant_types": [],
"redirect_uris": [
"<string>"
],
"logo_uri": "<string>",
"policy_uri": "<string>",
"tos_uri": "<string>"
}
'{
"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>"
}
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
OAuth client ID
Body
application/json
The name of the OAuth client
List of allowed OAuth scopes
Example:
["admin"]Whether PKCE (Proof Key for Code Exchange) is required for this client
List of allowed OAuth grant types
Available options:
client_credentials, authorization_code, refresh_token List of redirect URIs
URL of the client logo
URL of the client's privacy policy
URL of the client's terms of service
Response
OAuth client updated successfully
Show child attributes
Show child attributes
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
});
const oauthClient = await client.oauthClients.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(oauthClient.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
)
oauth_client = client.oauth_clients.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(oauth_client.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"),
)
oauthClient, err := client.OAuthClients.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.OAuthClientUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", oauthClient.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.oauthclients.OAuthClientUpdateParams;
import com.telnyx.sdk.models.oauthclients.OAuthClientUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
OAuthClientUpdateResponse oauthClient = client.oauthClients().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
oauth_client = telnyx.oauth_clients.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(oauth_client)<?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 {
$oauthClient = $client->oauthClients->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
allowedGrantTypes: ['client_credentials'],
allowedScopes: ['admin'],
logoUri: 'https://example.com',
name: 'name',
policyUri: 'https://example.com',
redirectUris: ['https://example.com'],
requirePkce: true,
tosUri: 'https://example.com',
);
var_dump($oauthClient);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx oauth-clients update \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request PUT \
--url https://api.telnyx.com/v2/oauth/clients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowed_scopes": [
"admin"
],
"require_pkce": true,
"allowed_grant_types": [],
"redirect_uris": [
"<string>"
],
"logo_uri": "<string>",
"policy_uri": "<string>",
"tos_uri": "<string>"
}
'{
"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>"
}
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}