Go
package example
import (
context "context"
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>",
),
)
client.Guardian.Factors.Sms.GetTwilioProvider(
context.TODO(),
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.sms.getTwilioProvider();
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.sms.getTwilioProvider();
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"auth_token": "zw5Ku6z2sxhd0ZVXto5SDHX6KPDByJPU",
"from": "+1223323",
"messaging_service_sid": "5dEkAiHLPCuQ1uJj4qNXcAnERFAL6cpq",
"sid": "wywA2BH4VqTpfywiDuyDAYZL3xQjoO40"
}SMS の Twilio 認証要素プロバイダーを取得
Twilio SMS プロバイダーの設定を取得します(サブスクリプションが必要)。
電話番号ファクターに関連する Twilio 設定を取得するための新しいエンドポイント(phone Twilio configuration)を利用できます。ペイロードはこのエンドポイントと同じです。代わりにそちらを使用してください。
GET
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
sms
/
providers
/
twilio
Go
package example
import (
context "context"
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>",
),
)
client.Guardian.Factors.Sms.GetTwilioProvider(
context.TODO(),
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.sms.getTwilioProvider();
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.sms.getTwilioProvider();
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/guardian/factors/sms/providers/twilio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"auth_token": "zw5Ku6z2sxhd0ZVXto5SDHX6KPDByJPU",
"from": "+1223323",
"messaging_service_sid": "5dEkAiHLPCuQ1uJj4qNXcAnERFAL6cpq",
"sid": "wywA2BH4VqTpfywiDuyDAYZL3xQjoO40"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
レスポンス
Twilio SMS の設定を正常に取得しました。
Twilio 認証トークン
Required string length:
1 - 1000From 番号
Maximum string length:
64Copilot SID
Required string length:
1 - 1000Twilio SID
Required string length:
1 - 1000⌘I