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

# エンドユーザー取得

> ID を指定してエンドユーザーを取得します。他の API がエンドユーザー ID を返す場合（例：[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード)の `created_by`）に便利です。



## OpenAPI

````yaml /ja/api-reference/openapi_completion.json get /end-users/{end_user_id}
openapi: 3.0.1
info:
  title: Completion アプリ API
  description: テキスト生成アプリケーションはセッションなしで動作し、翻訳、記事作成、要約 AI などに最適です。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: テキスト生成アプリ API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: 完了メッセージ
    description: テキスト生成に関連する操作です。
  - name: ファイル操作
    description: ファイル管理に関連する操作です。
  - name: エンドユーザー
    description: エンドユーザー情報に関連する操作です。
  - name: メッセージフィードバック
    description: ユーザーフィードバックに関連する操作です。
  - name: 音声・テキスト変換
    description: テキスト読み上げと音声認識に関連する操作です。
  - name: アプリケーション設定
    description: アプリケーション設定と情報を取得する操作です。
paths:
  /end-users/{end_user_id}:
    get:
      tags:
        - エンドユーザー
      summary: エンドユーザー取得
      description: >-
        ID を指定してエンドユーザーを取得します。他の API がエンドユーザー ID
        を返す場合（例：[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード)の
        `created_by`）に便利です。
      operationId: getEndUserCompletionJp
      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: レスポンス例
                  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`
            識別子です（例：[完了メッセージを送信](/api-reference/完了メッセージ/完了メッセージを送信) の `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 Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer `
        プレフィックスを付けた API Key を含めてください。例：`Authorization: Bearer {API_KEY}`。**API
        Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key
        の漏洩は深刻な結果につながる可能性があります。**

````