Go
package example
import (
context "context"
phone "github.com/auth0/go-auth0/management/management/branding/phone"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &phone.UpdateBrandingPhoneProviderRequestContent{}
client.Branding.Phone.Providers.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.providers.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.providers.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/branding/phone/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"credentials": {
"auth_token": "<string>"
},
"disabled": true
}
'import requests
url = "https://{tenantDomain}/api/v2/branding/phone/providers/{id}"
payload = {
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"credentials": { "auth_token": "<string>" },
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/branding/phone/providers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'delivery_methods' => [
],
'sid' => '<string>',
'default_from' => '<string>',
'mssid' => '<string>'
],
'credentials' => [
'auth_token' => '<string>'
],
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/branding/phone/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"delivery_methods\": [],\n \"sid\": \"<string>\",\n \"default_from\": \"<string>\",\n \"mssid\": \"<string>\"\n },\n \"credentials\": {\n \"auth_token\": \"<string>\"\n },\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/branding/phone/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"delivery_methods\": [],\n \"sid\": \"<string>\",\n \"default_from\": \"<string>\",\n \"mssid\": \"<string>\"\n },\n \"credentials\": {\n \"auth_token\": \"<string>\"\n },\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"channel": "phone",
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"disabled": true,
"id": "<string>",
"tenant": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}電話プロバイダーを更新
電話プロバイダーを更新します。
credentials オブジェクトでは、電話プロバイダー(name プロパティで指定)に応じて異なるプロパティが必要です。
PATCH
https://{tenantDomain}/api/v2
/
branding
/
phone
/
providers
/
{id}
Go
package example
import (
context "context"
phone "github.com/auth0/go-auth0/management/management/branding/phone"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &phone.UpdateBrandingPhoneProviderRequestContent{}
client.Branding.Phone.Providers.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.providers.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.providers.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/branding/phone/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"credentials": {
"auth_token": "<string>"
},
"disabled": true
}
'import requests
url = "https://{tenantDomain}/api/v2/branding/phone/providers/{id}"
payload = {
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"credentials": { "auth_token": "<string>" },
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/branding/phone/providers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'delivery_methods' => [
],
'sid' => '<string>',
'default_from' => '<string>',
'mssid' => '<string>'
],
'credentials' => [
'auth_token' => '<string>'
],
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/branding/phone/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"delivery_methods\": [],\n \"sid\": \"<string>\",\n \"default_from\": \"<string>\",\n \"mssid\": \"<string>\"\n },\n \"credentials\": {\n \"auth_token\": \"<string>\"\n },\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/branding/phone/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"delivery_methods\": [],\n \"sid\": \"<string>\",\n \"default_from\": \"<string>\",\n \"mssid\": \"<string>\"\n },\n \"credentials\": {\n \"auth_token\": \"<string>\"\n },\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"channel": "phone",
"configuration": {
"delivery_methods": [],
"sid": "<string>",
"default_from": "<string>",
"mssid": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"disabled": true,
"id": "<string>",
"tenant": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
Required string length:
1 - 255ボディ
application/jsonapplication/x-www-form-urlencoded
レスポンス
電話プロバイダーが正常に更新されました。
電話プロバイダーの構成スキーマ
電話通知プロバイダーの名前
利用可能なオプション:
twilio, custom Required string length:
1 - 100このプロバイダーで受信可能な通知の種類を示します。
利用可能なオプション:
phone Maximum string length:
100- Option 1
- Option 2
Show child attributes
Show child attributes
プロバイダーの作成日時(ISO 8601 形式)
Maximum string length:
27プロバイダーが有効(false)か無効(true)か。
Required string length:
1 - 255テナント名
Required string length:
1 - 255ISO 8601 形式の、プロバイダーの最終更新日時
Maximum string length:
27⌘I