Update an FQDN authentication
Updates the FQDN authentication strategy for a specific FQDN connection.
PATCH
/
fqdn_connections
/
{fqdn_connection_id}
/
fqdn_authentication
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.fqdnConnections.fqdnAuthentication.patchAll('fqdn_connection_id');
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.fqdn_connections.fqdn_authentication.patch_all(
fqdn_connection_id="fqdn_connection_id",
)
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.FqdnConnections.FqdnAuthentication.PatchAll(
context.TODO(),
"fqdn_connection_id",
telnyx.FqdnConnectionFqdnAuthenticationPatchAllParams{
},
)
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.fqdnConnections.fqdnAuthentication.FqdnAuthenticationPatchAllParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
FqdnAuthenticationPatchAllParams params = FqdnAuthenticationPatchAllParams.builder()
.build();
var response = client.fqdnConnections().fqdnAuthentication().patchAll("fqdn_connection_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.fqdn_connections.fqdn_authentication.patch_all("fqdn_connection_id")
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->fqdnConnections->fqdnAuthentication->patchAll(
'fqdn_connection_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx fqdn-connections:fqdn-authentication patch-all \
--api-key 'My API Key' \
--fqdn-connection-id fqdn_connection_idcurl --request PATCH \
--url https://api.telnyx.com/v2/fqdn_connections/{fqdn_connection_id}/fqdn_authentication \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_name": "newusername",
"password": "new_password",
"ip_authentication_method": "p-charge-info",
"fqdn_outbound_authentication": "ip-authentication",
"webhook_url": "https://example.com",
"failover_url": "https://failover.example.com",
"txt_name": "new_txt_name",
"txt_value": "new_txt_value",
"txt_ttl": 300
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "fqdn_authentication",
"connection_id": "1293384261075731499",
"user_name": "<string>",
"password": "<string>",
"webhook_url": "<string>",
"failover_url": "<string>",
"microsoft_teams_sbc": false,
"txt_name": "<string>",
"txt_value": "<string>",
"txt_ttl": 123
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"detail": "A previous update to this connection is still in progress. Please try again later."
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Invalid dnis_format: test, was provided. Acceptable formats are +e164, e164, national, sip_username",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
},
"source": {
"pointer": "/inbound/dnis_number_format"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the FQDN connection.
Body
application/json
Parameters that can be updated in an FQDN authentication
The username for authentication.
The password for authentication.
The IP authentication method.
Available options:
token, p-charge-info The outbound authentication type.
Available options:
ip-authentication, credential-authentication The webhook URL for authentication events.
The failover webhook URL.
The TXT record name for Microsoft Teams SBC DNS verification.
The TXT record value for Microsoft Teams SBC DNS verification.
The TTL for the TXT record.
Response
Successful response with the updated FQDN authentication.
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 response = await client.fqdnConnections.fqdnAuthentication.patchAll('fqdn_connection_id');
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.fqdn_connections.fqdn_authentication.patch_all(
fqdn_connection_id="fqdn_connection_id",
)
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.FqdnConnections.FqdnAuthentication.PatchAll(
context.TODO(),
"fqdn_connection_id",
telnyx.FqdnConnectionFqdnAuthenticationPatchAllParams{
},
)
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.fqdnConnections.fqdnAuthentication.FqdnAuthenticationPatchAllParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
FqdnAuthenticationPatchAllParams params = FqdnAuthenticationPatchAllParams.builder()
.build();
var response = client.fqdnConnections().fqdnAuthentication().patchAll("fqdn_connection_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.fqdn_connections.fqdn_authentication.patch_all("fqdn_connection_id")
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->fqdnConnections->fqdnAuthentication->patchAll(
'fqdn_connection_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx fqdn-connections:fqdn-authentication patch-all \
--api-key 'My API Key' \
--fqdn-connection-id fqdn_connection_idcurl --request PATCH \
--url https://api.telnyx.com/v2/fqdn_connections/{fqdn_connection_id}/fqdn_authentication \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_name": "newusername",
"password": "new_password",
"ip_authentication_method": "p-charge-info",
"fqdn_outbound_authentication": "ip-authentication",
"webhook_url": "https://example.com",
"failover_url": "https://failover.example.com",
"txt_name": "new_txt_name",
"txt_value": "new_txt_value",
"txt_ttl": 300
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "fqdn_authentication",
"connection_id": "1293384261075731499",
"user_name": "<string>",
"password": "<string>",
"webhook_url": "<string>",
"failover_url": "<string>",
"microsoft_teams_sbc": false,
"txt_name": "<string>",
"txt_value": "<string>",
"txt_ttl": 123
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"detail": "A previous update to this connection is still in progress. Please try again later."
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Invalid dnis_format: test, was provided. Acceptable formats are +e164, e164, national, sip_username",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
},
"source": {
"pointer": "/inbound/dnis_number_format"
}
}
]
}