メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
device-credentials
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    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 := &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(),
    }
    client.DeviceCredentials.List(
        context.TODO(),
        request,
    )
}
[
  {
    "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww",
    "device_id": "550e8400-e29b-41d4-a716-446655440000",
    "device_name": "iPhone Mobile Safari UI/WKWebView",
    "id": "dcr_0000000000000001",
    "user_id": "usr_5457edea1b8f33391a000004"
  }
]

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

クエリパラメータ

page
integer

返却する結果のページインデックス。先頭ページは 0 です。

必須範囲: x >= 0
per_page
integer

1 ページあたりの結果数。このエンドポイントで返せる結果は最大 1000 件です。

必須範囲: 1 <= x <= 100
include_totals
boolean

結果を、合計件数を含むオブジェクトとして返すか(true)、結果の配列を直接返すか(false、デフォルト)を指定します。

fields
string

結果に含める、または除外するフィールドのカンマ区切りリストです(include_fields に指定した値に基づきます)。すべてのフィールドを取得するには空のままにします。

include_fields
boolean

指定したフィールドを含めるか(true)、除外するか(false)を指定します。

user_id
string

取得するデバイスの user_id。

client_id
string

取得するデバイスの client_id。

type
enum<string>

取得する認証情報の種類。public_keyrefresh_token、または rotating_refresh_token である必要があります。ページングが要求された場合、このプロパティのデフォルトは refresh_token になります。 取得する認証情報の種類。public_keyrefresh_token、または rotating_refresh_token である必要があります。ページングが要求された場合、このプロパティの既定値は refresh_token です

利用可能なオプション:
public_key,
refresh_token,
rotating_refresh_token

レスポンス

デバイス認証情報を正常に取得しました。

client_id
string
デフォルト:AaiyAPdpYdesoKnqjj8HJqRn4T5titww

この認証情報の対象であるクライアント(アプリケーション)の client_id。

device_id
string
デフォルト:550e8400-e29b-41d4-a716-446655440000

デバイスの一意の識別子。注: このフィールドは通常、refresh_tokens および rotating_refresh_tokens では設定されません

device_name
string
デフォルト:iPhone Mobile Safari UI/WKWebView

このデバイスのユーザーエージェント

id
string
デフォルト:dcr_0000000000000001

このデバイスの ID。

type
enum<string>

認証情報の種類。public_keyrefresh_token、または rotating_refresh_token を指定できます。

利用可能なオプション:
public_key,
refresh_token,
rotating_refresh_token
user_id
string
デフォルト:usr_5457edea1b8f33391a000004

この認証情報に関連付けられている user_id。