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

# 代理ログイン

> トラブルシューティングのために、別のユーザーとしてログインできる代理ログイン用URLを取得します。

<div id="endpoint">
  ## エンドポイント
</div>

`POST /users/{user_id}/impersonate`

このエンドポイントを使用すると、別のユーザーとしてログインするためのURLを取得できます。トラブルシューティングに役立ちます。

<div id="remarks">
  ### 注記
</div>

* このエンドポイントは、**Global Client** の認証情報でのみ使用できます。
* 実際のログインと代理ログインを区別するため、代理されたユーザーのプロフィールには、`impersonated` および `impersonator` という追加のプロパティが含まれます。例: `"impersonated": true, "impersonator": {"user_id": "auth0|...", "email": "admin@example.com"}`。
* 通常の Web アプリでは、`additionalParameters` を設定する必要があります。`response_type` は `code`、`callback_url` は Auth0 が認可コードを付与してリダイレクトするコールバック URL、`scope` は JWT に含めたい JWT クレームに設定してください。

<div id="body-parameters">
  ## リクエスト本文のパラメーター
</div>

<ParamField body="protocol" type="string" required />

<ParamField body="impersonator_id" type="string" required />

<ParamField body="client_id" type="string" required />

<ParamField body="additionalParameters" type="object" />

<div id="response-messages">
  ## レスポンスメッセージ
</div>

| Status | Description      |
| ------ | ---------------- |
| 200    | 代理ログイン用URLの取得に成功 |
