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.Enrollments.Get(
context.TODO(),
"id",
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.enrollments.get("id");
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.enrollments.get("id");
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/guardian/enrollments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/guardian/enrollments/{id}"
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/enrollments/{id}",
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/enrollments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/guardian/enrollments/{id}")
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{
"id": "dev_0000000000000001",
"enrolled_at": "2016-07-12T17:56:26.804Z",
"identifier": "76dc-a90c-a88c-a90c-a88c-a88c-a90c",
"last_auth": "2016-07-12T17:56:26.804Z",
"name": "iPhone 7",
"phone_number": "+1 999999999999",
"status": "pending"
}ID で登録情報を取得
ユーザーアカウントに登録されている特定の多要素認証の登録について、ステータスや種類などの詳細を取得します。
GET
https://{tenantDomain}/api/v2
/
guardian
/
enrollments
/
{id}
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.Enrollments.Get(
context.TODO(),
"id",
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.enrollments.get("id");
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.enrollments.get("id");
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/guardian/enrollments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/guardian/enrollments/{id}"
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/enrollments/{id}",
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/enrollments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/guardian/enrollments/{id}")
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{
"id": "dev_0000000000000001",
"enrolled_at": "2016-07-12T17:56:26.804Z",
"identifier": "76dc-a90c-a88c-a90c-a88c-a88c-a90c",
"last_auth": "2016-07-12T17:56:26.804Z",
"name": "iPhone 7",
"phone_number": "+1 999999999999",
"status": "pending"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
取得する登録のID。
レスポンス
登録を正常に取得しました。
この登録の ID。
登録日時。
デバイス識別子。通常は電話番号の識別子です。
登録日時。
デバイス名(プッシュ通知の場合のみ)。
Required string length:
1 - 20Pattern:
^\+[0-9]{8, 20}電話番号。
この登録のステータス。pending または confirmed です。
利用可能なオプション:
pending, confirmed ⌘I