> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# エンドユーザー取得

> **対象アプリ**：Chatflow、Workflow、チャットボット、Agent、テキストジェネレーター。

ID を指定してエンドユーザーの詳細を返します。別のエンドポイントが返したエンドユーザー ID（例：[ファイルをアップロード](/ja/3.11.x/develop/api/files/upload-file) レスポンスの `created_by`）を解決するのに便利です。



## OpenAPI

````yaml /ja/3.11.x/develop/api/openapi_service.json get /end-users/{end_user_id}
openapi: 3.0.1
info:
  title: Dify サービス API
  description: >-
    Dify アプリケーションとナレッジベースのための REST API です。アプリケーション系エンドポイントはアプリの API
    キーで、ナレッジ系エンドポイントはナレッジベースの API キーで認証します。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Dify サービス API のベース URL です。ご利用のデプロイ環境の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.example.com/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: チャットメッセージ
    description: チャットメッセージとインタラクションに関連する操作です。
  - name: ファイル操作
    description: ファイルのアップロードとプレビューの操作です。
  - name: エンドユーザー
    description: エンドユーザー情報に関連する操作です。
  - name: メッセージフィードバック
    description: ユーザーフィードバックの操作です。
  - name: 会話管理
    description: 会話管理に関連する操作です。
  - name: 音声・テキスト変換
    description: テキスト読み上げと音声認識の操作です。
  - name: アプリケーション設定
    description: アプリケーション設定と情報を取得する操作です。
  - name: アノテーション管理
    description: ダイレクト返信用のアノテーション管理に関連する操作です。
  - name: 人間の入力
    description: 人間の入力を要する一時停止中のワークフローの再開操作です。
  - name: ワークフロー実行
    description: ワークフローの実行と管理のための操作です。
  - name: 完了メッセージ
    description: テキスト生成に関連する操作です。
  - name: ナレッジベース
    description: ナレッジベースの作成、設定、取得を含むナレッジベース管理の操作です。
  - name: ドキュメント
    description: ナレッジベース内のドキュメントの作成、更新、管理のための操作です。
  - name: チャンク
    description: ドキュメントチャンクと子チャンクの管理のための操作です。
  - name: メタデータ
    description: ナレッジベースのメタデータフィールドとドキュメントメタデータ値の管理のための操作です。
  - name: タグ管理
    description: ナレッジベースタグとタグバインディングの管理のための操作です。
  - name: モデル
    description: 利用可能なモデルを取得するための操作です。
  - name: ナレッジパイプライン
    description: データソースプラグインとパイプライン実行を含むナレッジパイプラインの管理と実行のための操作です。
paths:
  /end-users/{end_user_id}:
    get:
      tags:
        - エンドユーザー
      summary: エンドユーザー取得
      description: >-
        **対象アプリ**：Chatflow、Workflow、チャットボット、Agent、テキストジェネレーター。


        ID を指定してエンドユーザーの詳細を返します。別のエンドポイントが返したエンドユーザー
        ID（例：[ファイルをアップロード](/ja/3.11.x/develop/api/files/upload-file) レスポンスの
        `created_by`）を解決するのに便利です。
      operationId: getEndUserChatJa
      parameters:
        - name: end_user_id
          in: path
          required: true
          description: 照会するエンドユーザーの ID です。
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: エンドユーザーを正常に取得しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserDetail'
              examples:
                endUserDetail:
                  summary: Response Example
                  value:
                    id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
                    tenant_id: 11223344-5566-7788-99aa-bbccddeeff00
                    app_id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                    type: service-api
                    external_user_id: abc-123
                    name: null
                    is_anonymous: false
                    session_id: abc-123
                    created_at: '2024-01-16T12:00:29Z'
                    updated_at: '2024-01-16T12:00:29Z'
        '404':
          description: '`end_user_not_found` : エンドユーザーが見つかりません。'
          content:
            application/json:
              examples:
                end_user_not_found:
                  summary: end_user_not_found
                  value:
                    status: 404
                    code: end_user_not_found
                    message: End user not found.
components:
  schemas:
    EndUserDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: エンドユーザー ID。
        tenant_id:
          type: string
          format: uuid
          description: テナント ID。
        app_id:
          type: string
          format: uuid
          nullable: true
          description: アプリケーション ID。
        type:
          type: string
          description: エンドユーザーのタイプ。Service API ユーザーの場合は常に `service-api` です。
        external_user_id:
          type: string
          nullable: true
          description: >-
            API リクエストで提供された `user`
            識別子です（例：[チャットメッセージを送信](/ja/3.11.x/develop/api/chat-messages/send-chat-message)
            の `user` フィールド）。
        name:
          type: string
          nullable: true
          description: エンドユーザー名。
        is_anonymous:
          type: boolean
          description: ユーザーが匿名かどうかを示します。元の API リクエストで `user` 識別子が提供されなかった場合、`true` になります。
        session_id:
          type: string
          description: セッション識別子。デフォルトは `external_user_id` の値です。
        created_at:
          type: string
          format: date-time
          description: 作成タイムスタンプ。
        updated_at:
          type: string
          format: date-time
          description: 最終更新タイムスタンプ。
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        すべてのリクエストは API キーで認証します：`Authorization: Bearer
        {API_KEY}`。アプリのエンドポイントにはアプリの API キーを、ナレッジのエンドポイントにはナレッジベースの API
        キーを使用します（[Dify API
        クイックスタート](/ja/3.11.x/develop/api/guides/get-started)）。


        キーはサーバーサイドで保管し、クライアントコードには決して埋め込まないでください。キーが欠落または無効なリクエストは HTTP
        `401`（`unauthorized`）で失敗します。

````