using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.DeviceCredentials.ListAsync(
new ListDeviceCredentialsRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true,
Fields = "fields",
IncludeFields = true,
UserId = "user_id",
ClientId = "client_id",
Type = DeviceCredentialTypeEnum.PublicKey
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListDeviceCredentialsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
UserId: management.String(
"user_id",
),
ClientId: management.String(
"client_id",
),
Type: management.DeviceCredentialTypeEnumPublicKey.Ptr(),
}
mgmt.DeviceCredentials.List(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.DeviceCredentialTypeEnum;
import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.deviceCredentials().list(
ListDeviceCredentialsRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.fields("fields")
.includeFields(true)
.userId("user_id")
.clientId("client_id")
.type(DeviceCredentialTypeEnum.PUBLIC_KEY)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\DeviceCredentials\Requests\ListDeviceCredentialsRequestParameters;
use Auth0\SDK\API\Management\Types\DeviceCredentialTypeEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->deviceCredentials->list(
new ListDeviceCredentialsRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
'fields' => 'fields',
'includeFields' => true,
'userId' => 'user_id',
'clientId' => 'client_id',
'type' => DeviceCredentialTypeEnum::PublicKey->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.device_credentials.list(
page=1,
per_page=1,
include_totals=True,
fields="fields",
include_fields=True,
user_id="user_id",
client_id="client_id",
type="public_key",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.device_credentials.list(
page: 1,
per_page: 1,
include_totals: true,
fields: "fields",
include_fields: true,
user_id: "user_id",
client_id: "client_id",
type: "public_key"
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.deviceCredentials.list({
page: 1,
perPage: 1,
includeTotals: true,
fields: "fields",
includeFields: true,
userId: "user_id",
clientId: "client_id",
type: "public_key",
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.deviceCredentials.list({
page: 1,
perPage: 1,
includeTotals: true,
fields: "fields",
includeFields: true,
userId: "user_id",
clientId: "client_id",
type: "public_key",
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/device-credentials \
--header 'Authorization: Bearer <token>'[
{
"client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww",
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"device_name": "iPhone Mobile Safari UI/WKWebView",
"id": "dcr_0000000000000001",
"user_id": "usr_5457edea1b8f33391a000004"
}
]デバイス資格情報を取得
特定のユーザーに関連付けられたデバイス資格情報(public_key、refresh_token、または rotating_refresh_token)を取得します。
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.DeviceCredentials.ListAsync(
new ListDeviceCredentialsRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true,
Fields = "fields",
IncludeFields = true,
UserId = "user_id",
ClientId = "client_id",
Type = DeviceCredentialTypeEnum.PublicKey
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListDeviceCredentialsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
UserId: management.String(
"user_id",
),
ClientId: management.String(
"client_id",
),
Type: management.DeviceCredentialTypeEnumPublicKey.Ptr(),
}
mgmt.DeviceCredentials.List(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.DeviceCredentialTypeEnum;
import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.deviceCredentials().list(
ListDeviceCredentialsRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.fields("fields")
.includeFields(true)
.userId("user_id")
.clientId("client_id")
.type(DeviceCredentialTypeEnum.PUBLIC_KEY)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\DeviceCredentials\Requests\ListDeviceCredentialsRequestParameters;
use Auth0\SDK\API\Management\Types\DeviceCredentialTypeEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->deviceCredentials->list(
new ListDeviceCredentialsRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
'fields' => 'fields',
'includeFields' => true,
'userId' => 'user_id',
'clientId' => 'client_id',
'type' => DeviceCredentialTypeEnum::PublicKey->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.device_credentials.list(
page=1,
per_page=1,
include_totals=True,
fields="fields",
include_fields=True,
user_id="user_id",
client_id="client_id",
type="public_key",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.device_credentials.list(
page: 1,
per_page: 1,
include_totals: true,
fields: "fields",
include_fields: true,
user_id: "user_id",
client_id: "client_id",
type: "public_key"
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.deviceCredentials.list({
page: 1,
perPage: 1,
includeTotals: true,
fields: "fields",
includeFields: true,
userId: "user_id",
clientId: "client_id",
type: "public_key",
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.deviceCredentials.list({
page: 1,
perPage: 1,
includeTotals: true,
fields: "fields",
includeFields: true,
userId: "user_id",
clientId: "client_id",
type: "public_key",
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/device-credentials \
--header 'Authorization: Bearer <token>'[
{
"client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww",
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"device_name": "iPhone Mobile Safari UI/WKWebView",
"id": "dcr_0000000000000001",
"user_id": "usr_5457edea1b8f33391a000004"
}
]承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
クエリパラメータ
返される結果のページ index。最初のページは 0 です。
x >= 01 ページあたりの結果数。この endpoint で返せる結果は最大 1000 件です。
1 <= x <= 100結果を、結果の総数を含むオブジェクトとして返すか(true)、結果の array を直接返すか(false、default)。
結果に含める、または除外するフィールドのカンマ区切りリストです(include_fields に指定した値に応じます)。すべてのフィールドを取得するには空のままにします。
指定したフィールドを含めるか(true)、除外するか(false)。
取得するデバイスの user_id。
取得するデバイスの client_id。
取得する資格情報の種類。public_key、refresh_token、または rotating_refresh_token である必要があります。ページ指定が要求された場合、このプロパティのデフォルトは refresh_token になります
取得する資格情報の種類。public_key、refresh_token、または rotating_refresh_token でなければなりません。ページングが要求された場合、このプロパティのデフォルト値は refresh_token になります
public_key, refresh_token, rotating_refresh_token レスポンス
デバイス資格情報を正常に取得しました。
- object[]
- object
この資格情報の対象となるクライアント(アプリケーション)の client_id。
デバイスの一意の識別子。注: このフィールドは通常、refresh_tokens と rotating_refresh_tokens では設定されません
このデバイスのユーザーエージェント
このデバイスの ID。
資格情報の種類。public_key、refresh_token、または rotating_refresh_token を指定できます。
public_key, refresh_token, rotating_refresh_token この資格情報に関連付けられた user_id。