> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 同意の署名鍵を一覧表示する

> 認証済みユーザーに登録されている同意の署名鍵の一覧を取得します。



## OpenAPI

````yaml docs/ja-jp/oas/myaccount/myaccount-api-oas.json GET /consent-signing-keys
openapi: 3.1.0
info:
  title: My Account
  version: '1.0'
  description: >-
    Auth0 My Account API は、ユーザーが自分のアカウント情報を管理するための専用のエンドポイント群を提供します。これらの API
    を使用すると、お客様はアプリケーション内でセルフサービス体験を構築したり、ユーザーアカウントに詳細情報を段階的に追加したりできます。


    My Account API は、現在ログイン中のユーザーのコンテキストで動作し、ユーザー向けアプリケーション内で直接使用できます。


    :::tip Auth0 ドメインとカスタムドメインの使い分け


    My Account API では、正規の Auth0
    ドメインまたはカスタムドメインを使用できますが、次の項目を含むプロセス全体で、必ず同じものを使用する必要があります。


    - アクセストークンを取得する

    - audience の値を設定する

    - My Account API エンドポイントを呼び出す


    詳しくは、[Custom Domains](https://auth0.com/docs/customize/custom-domains)
    をご覧ください。


    :::


    ## My Account API を有効化する


    Auth0 Dashboard でテナントの My Account API を有効化できます。


    1. Authentication > APIs に移動します。

    2. MyAccount API のバナーを見つけます。

    3. Activate を選択します。


    ![](https://images.ctfassets.net/cdy7uua7fh8z/DGkDQNIHcegN8vtQyEvF3/a2e98b06867701a66fa1f1b3df1c996b/My_Account_API_-_Activate.png)


    デフォルトでは、My Account API は次の application API access policies で作成されます。


    `require_client_grant` はユーザーフロー用


    `deny_all` はクライアント（machine-to-machine）フロー用


    アプリケーションがユーザーに代わって My Account API
    にアクセスするには、そのアプリケーションに対してクライアントグラントを明示的に作成する必要があります。これにより、そのアプリケーションがリクエストできるスコープの上限を定義できます。あるいは、ユーザーアクセスポリシーのフローを
    allow_all に変更することもできます。これにより、テナント内の任意のアプリケーションが My Account API に対して任意の scope
    をリクエストできるようになります。


    My Account API は機密性の高い情報や操作を公開するため、Auth0 ではユーザーアクセスポリシーのフローに allow_all
    を使用することを推奨していません。My Account API
    では最小権限の原則に従い、アプリケーションが本当に必要なものにのみアクセスできるようにして、潜在的なセキュリティリスクを最小限に抑える必要があります。


    アプリケーションに最終的に付与される権限は、application API access policy でアプリケーションに許可される
    scopes、エンドユーザーに割り当てられたロールベースのアクセス制御 (RBAC)
    の権限、およびユーザーの同意（該当する場合）の共通部分によって決まります。


    :::info サポートされているフロー


    My Account API へのクライアントアクセス用の application API policy
    は更新できません。つまり、クライアント認証情報フローを使用して My Account API にアクセスすることはできません。


    :::


    application API access policies と、それに関連付けられた client grants
    の管理方法について詳しくは、[Application Access to APIs: Client
    Grants](https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants)
    をご覧ください。


    ## アクセストークンを取得する


    My Account API 用のアクセストークンは、自分の API 用のアクセストークンを取得する場合と同じ方法で取得できます。


    :::info &nbsp

    My Account API に機密性の高い操作（認証方法の登録など）を許可する場合は、[多要素認証
    (MFA)](https://auth0.com/docs/secure/multi-factor-authentication)
    によって追加のセキュリティポリシーを適用するために、[step-up
    authentication](https://auth0.com/docs/secure/multi-factor-authentication/step-up-authentication)
    を使用することを強く推奨します。

    :::


    Universal Login を使用している場合は、次の記事を参照してください。


    - [Call Your API Using the Authorization Code
    Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow/call-your-api-using-the-authorization-code-flow)

    - [Call Your API Using the Authorization Code Flow with
    PKCE](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce/call-your-api-using-the-authorization-code-flow-with-pkce)


    組み込みログインを使用している場合は、次の記事を参照してください。


    - [Call Your API Using Resource Owner Password
    Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/resource-owner-password-flow/call-your-api-using-resource-owner-password-flow)

    - [Login Flow with Native Passkeys
    API](https://auth0.com/docs/native-passkeys-api#login-flow)


    ## 例


    ### Universal Login での認可コードフロー


    **ステップ 1: 認可コードをリクエストする**


    ```

    curl --request GET \
      --url 'https://{yourDomain}/authorize?response_type=code&client_id={yourClientId}&redirect_uri=%7ByourRedirectUri%7D&scope=create%3Ame%3Aauthentication_methods&offline_access=&audience=https%3A%2F%2F{yourDomain}%2Fme%2F'
    ```


    **ステップ 2: code をアクセストークンと交換する**


    ```

    curl --request POST \
      --url 'https://{yourDomain}/oauth/token' \
      --header 'content-type: application/json' \
      --data '{"grant_type": "authorization_code","client_id": "{yourClientId}","client_secret": "{yourClientSecret}","code": "{yourAuthorizationCode}","redirect_uri": "{yourRedirectUri}","audience": "{yourAudience}","scope": "create:me:authentication_methods","offline_access": ""}'
    ```


    ### ネイティブ パスキーを使った埋め込み型ログイン


    **ステップ 1: ログインチャレンジをリクエストする**


    ```

    curl --request POST \
      --url 'https://{yourDomain}/passkey/challenge' \
      --header 'content-type: application/json' \
      --data '{"client_id": "{yourClientId}"}'
    ```


    **ステップ 2: 既存のユーザーを認証する**


    ```

    curl --request POST \
      --url 'https://{yourDomain}/oauth/token' \
      --header 'content-type: application/json' \
      --data '{  "grant_type": "urn:okta:params:oauth:grant-type:webauthn",  "client_id": "{yourClientId}",  "scope": "create:me:authentication_methods offline_access",  "audience": "https://{yourDomain}/me/",  "auth_session": "{sessionIdFromTheFirstRequest}",  "authn_response": "{authenticatorResponse}"}'
    ```
servers:
  - url: https://{host}/me/v1
    variables:
      host:
        default: auth0.auth0.com
        description: カスタムまたは標準のホスト名
security: []
tags:
  - name: factors
    description: 認証要素
    x-displayName: Factors
  - name: connected-accounts
    description: Connected Accounts
    x-displayName: Connected Accounts
  - name: authentication-methods
    description: 認証方法
    x-displayName: Authentication Methods
  - name: consents
    description: 同意
    x-displayName: Consents
  - name: organizations
    description: Organizations
    x-displayName: Organizations
  - name: profile
    description: プロフィール
    x-displayName: Profile
paths:
  /consent-signing-keys:
    get:
      tags:
        - consents
      summary: 同意の署名鍵を一覧表示する
      description: 認証済みユーザーに登録されている同意の署名鍵の一覧を取得します。
      operationId: listConsentSigningKeys
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSigningKeysConsentResponseContent'
          description: 同意の署名鍵を正常に取得しました
          headers:
            x-ratelimit-limit:
              $ref: '#/components/headers/XRateLimitLimitHeader'
            x-ratelimit-reset:
              $ref: '#/components/headers/XRateLimitResetHeader'
            x-ratelimit-remaining:
              $ref: '#/components/headers/XRateLimitRemainingHeader'
            x-correlation-id:
              $ref: '#/components/headers/CorrelationIdHeader'
            traceparent:
              $ref: '#/components/headers/TraceparentHeader'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - Bearer-DPoP:
            - read:me:consent_signing_keys
      x-codeSamples: []
components:
  schemas:
    ListSigningKeysConsentResponseContent:
      type: object
      properties:
        keys:
          type: array
          description: 認証済みユーザーに登録されている同意署名鍵の一覧。
          items:
            $ref: '#/components/schemas/GetSigningKeyConsentResponseContent'
      required:
        - keys
      additionalProperties: false
    GetSigningKeyConsentResponseContent:
      type: object
      description: ユーザーに登録されている同意署名鍵の概要。
      properties:
        kid:
          type: string
          description: Auth0がこの鍵に割り当てた鍵識別子。
          minLength: 1
          maxLength: 128
        device_identifier:
          type: string
          description: 対応する秘密鍵を保持するデバイスの人が判読できるラベル。
          minLength: 1
          maxLength: 128
        created_at:
          type: string
          format: date-time
          description: 鍵が登録された日時。
        expires_at:
          type: string
          format: date-time
          description: 鍵の有効期限日時。この日時以降、同意決定の検証には使用できません。
      required:
        - kid
        - device_identifier
        - created_at
        - expires_at
      additionalProperties: false
    ErrorResponse:
      properties:
        type:
          type: string
        status:
          type: number
        title:
          type: string
        detail:
          type: string
        validation_errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      required:
        - type
        - status
        - title
        - detail
      type: object
      additionalProperties: false
    ValidationError:
      type: object
      properties:
        detail:
          type: string
        field:
          type: string
        pointer:
          type: string
        source:
          type: string
      required:
        - detail
      additionalProperties: false
  headers:
    XRateLimitLimitHeader:
      required: true
      description: 制限ウィンドウ内で許可されるリクエストの最大数
      schema:
        type: number
    XRateLimitResetHeader:
      required: true
      description: bucket が補充される予定時刻（UNIXタイムスタンプ、秒単位）
      schema:
        type: number
    XRateLimitRemainingHeader:
      required: true
      description: リクエストが拒否されるまで、現在のウィンドウ内で残っているリクエスト数
      schema:
        type: number
    CorrelationIdHeader:
      required: false
      description: リクエストで指定された検証済みの`x-correlation-id`、または指定されなかった場合は生成されたUUID v4を返します。
      schema:
        type: string
    TraceparentHeader:
      required: false
      description: >-
        新しい子スパンIDとともに受信トレースIDを返す[W3C Trace
        Context](https://www.w3.org/TR/trace-context/)ヘッダー。
      schema:
        type: string
    RetryAfterHeader:
      required: true
      description: クライアントが新しいリクエストを行う前に待機すべき秒数
      schema:
        type: number
    XAuth0ErrorKindHeader:
      description: レート制限の超過がグローバル（tenant 単位）制限であることを示す指標。
      schema:
        type: string
        const: global-rate-limit
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: 認証されていません。
      headers:
        x-correlation-id:
          $ref: '#/components/headers/CorrelationIdHeader'
        traceparent:
          $ref: '#/components/headers/TraceparentHeader'
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: アクセスが禁止されています。
      headers:
        x-correlation-id:
          $ref: '#/components/headers/CorrelationIdHeader'
        traceparent:
          $ref: '#/components/headers/TraceparentHeader'
    TooManyRequests:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: リクエストが多すぎます。
      headers:
        retry-after:
          $ref: '#/components/headers/RetryAfterHeader'
        x-ratelimit-limit:
          $ref: '#/components/headers/XRateLimitLimitHeader'
        x-ratelimit-reset:
          $ref: '#/components/headers/XRateLimitResetHeader'
        x-ratelimit-remaining:
          $ref: '#/components/headers/XRateLimitRemainingHeader'
        x-auth0-error-kind:
          $ref: '#/components/headers/XAuth0ErrorKindHeader'
        x-correlation-id:
          $ref: '#/components/headers/CorrelationIdHeader'
        traceparent:
          $ref: '#/components/headers/TraceparentHeader'
  securitySchemes:
    Bearer-DPoP:
      type: http
      scheme: bearer
      description: Bearer トークンと DPoP トークンは、API の設定に応じてサポートされます

````