> ## 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.

> トリガーの実行に関するコンテキスト情報を提供する、credentials-exchange Action トリガーのイベントオブジェクトについて説明します。

# イベントオブジェクト

credentials-exchange Actions トリガーの `event` オブジェクトは、トリガーの実行に関するコンテキスト情報を提供します。

```json Event Object theme={null}
{
  "secrets": {},
  "accessToken": {
    "customClaims": {},
    "scope": []
  },
  "client": {
    "client_id": "string",
    "metadata": {},
    "name": "string"
  },
  "request": {
    "body": {},
    "geoip": {},
    "ip": "string",
    "method": "string"
  },
  "resource_server": {
    "identifier": "string"
  },
  "tenant": {
    "id": "string"
  },
  "transaction": {
    "requested_scopes": []
  }
}
```

<div id="eventaccesstoken">
  ## `event.accessToken`
</div>

<ResponseField name="event.accessToken" type="object">
  発行するアクセストークンに関する情報。

  <Expandable title="event.accessTokenのプロパティ" defaultOpen>
    <ResponseField name="customClaims" type="dictionary" />

    <ResponseField name="scope" type="array of string" />
  </Expandable>
</ResponseField>

<div id="eventagent">
  ## `event.agent`
</div>

<ResponseField name="event.agent" type="object" post={["optional"]}>
  \[早期アクセス] このフローで動作するエージェントに関する情報です。トークンをリクエストするクライアントがエージェントにリンクされ、かつテナントでエージェントをプリンシパルとして使用する機能が有効になっている場合に設定されます。それ以外の場合は`undefined`です。

  <Expandable title="event.agentのプロパティ" defaultOpen>
    <ResponseField name="agent_id" type="string">
      \[早期アクセス] `agt_`で始まるエージェントの固定識別子 (例: `agt_2hVk6JxPxbRgNZDKfJQqmn`) 。
    </ResponseField>

    <ResponseField name="agent_metadata" type="dictionary">
      \[早期アクセス] エージェントに関連付けられた自由形式のキーと値のメタデータ。`agent`が存在する場合は常に定義され、エージェントにメタデータがない場合は空のオブジェクトになります。
    </ResponseField>

    <ResponseField name="name" type="string">
      \[早期アクセス] エージェントの人間が理解しやすい名前。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventclient">
  ## `event.client`
</div>

<ResponseField name="event.client" type="object">
  このトークン交換で使用されるクライアントに関する情報。

  <Expandable title="event.client のプロパティ" defaultOpen>
    <ResponseField name="client_id" type="string">
      ユーザーがログインするアプリケーションのクライアント ID。
    </ResponseField>

    <ResponseField name="metadata" type="dictionary">
      その他のアプリケーションプロパティを格納するオブジェクト。
    </ResponseField>

    <ResponseField name="name" type="string">
      アプリケーションの名前 (Auth0 Dashboard で定義) 。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventcustom_domain">
  ## `event.custom_domain`
</div>

<ResponseField name="event.custom_domain" type="object" post={["optional"]}>
  現在のトランザクションに関連付けられているカスタムドメインの詳細。

  <Expandable title="event.custom_domain のプロパティ" defaultOpen>
    <ResponseField name="domain" type="string">
      カスタムドメイン名。
    </ResponseField>

    <ResponseField name="domain_metadata" type="dictionary">
      キーと値のペアで構成されるカスタムドメインのメタデータ。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventorganization">
  ## `event.organization`
</div>

<ResponseField name="event.organization" type="dictionary" post={["optional"]}>
  現在のトランザクションに関連付けられた組織の詳細。

  <Expandable title="event.organizationのプロパティ" defaultOpen>
    <ResponseField name="id" type="string">
      組織ID。
    </ResponseField>

    <ResponseField name="display_name" type="string">
      組織の表示名。
    </ResponseField>

    <ResponseField name="metadata" type="dictionary">
      組織に関連付けられたメタデータ。
    </ResponseField>

    <ResponseField name="name" type="string">
      組織の名前。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventrequest">
  ## `event.request`
</div>

<ResponseField name="event.request" type="object">
  トランザクションを開始したリクエストに関する詳細。

  <Expandable title="リクエストのプロパティ" defaultOpen>
    <ResponseField name="body" type="dictionary">
      POSTリクエストの本文。このデータは、リフレッシュトークンフロー、Client Credential Exchangeフロー、およびPreUserRegistration Actionでのみ利用できます。
    </ResponseField>

    <ResponseField name="geoip" type="dictionary">
      <Expandable title="geoipのプロパティ" defaultOpen>
        <ResponseField name="cityName" type="string" post={["optional"]} />

        <ResponseField name="continentCode" type="string" post={["optional"]} />

        <ResponseField name="countryCode" type="string" post={["optional"]} />

        <ResponseField name="countryCode3" type="string" post={["optional"]} />

        <ResponseField name="countryName" type="string" post={["optional"]} />

        <ResponseField name="latitude" type="number" post={["optional"]} />

        <ResponseField name="longitude" type="number" post={["optional"]} />

        <ResponseField name="subdivisionCode" type="string" post={["optional"]} />

        <ResponseField name="subdivisionName" type="string" post={["optional"]} />

        <ResponseField name="timeZone" type="string" post={["optional"]} />
      </Expandable>
    </ResponseField>

    <ResponseField name="hostname" type="string" post={["optional"]}>
      認証フローで使用されるホスト名。
    </ResponseField>

    <ResponseField name="ip" type="string">
      リクエストの送信元IPアドレス。
    </ResponseField>

    <ResponseField name="language" type="string" post={["optional"]}>
      ブラウザが要求した言語。
    </ResponseField>

    <ResponseField name="method" type="string">
      リクエストで使用されるHTTPメソッド。
    </ResponseField>

    <ResponseField name="user_agent" type="string" post={["optional"]}>
      トランザクションの開始時に受信した`User-Agent`ヘッダーの値。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventresource_server">
  ## `event.resource_server`
</div>

<ResponseField name="event.resource_server" type="object">
  アクセストークンを発行するリソースサーバーに関する情報。

  <Expandable title="event.resource_server のプロパティ" defaultOpen>
    <ResponseField name="identifier" type="string">
      リソースサーバーの識別子。例: `https://your-api.example.com`。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventsecrets">
  ## `event.secrets`
</div>

<ResponseField name="event.secrets" type="secrets">
  このActionに安全に紐付けられたSecretの値。
</ResponseField>

<div id="eventtenant">
  ## `event.tenant`
</div>

<ResponseField name="event.tenant" type="object">
  このトークン交換で使用されるテナントに関する情報。

  <Expandable title="event.tenantのプロパティ" defaultOpen>
    <ResponseField name="id" type="string">
      テナントの名前。
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="eventtransaction">
  ## `event.transaction`
</div>

<ResponseField name="event.transaction" type="object">
  資格情報交換トランザクションに関する情報。

  <Expandable title="event.transaction のプロパティ" defaultOpen>
    <ResponseField name="correlation_id" type="string" post={["optional"]}>
      アプリケーションがUniversal Loginにリダイレクトする際、初回認証リクエストでCorrelation IDを指定できます。この値を使用して、Actionコードからのログやリクエストをユーザーフローに関連付けることができます。
    </ResponseField>

    <ResponseField name="requested_scopes" type="array of string">
      アクセストークンのリクエスト時に指定されたスコープ (指定されている場合) 。
    </ResponseField>

    <ResponseField name="target_scopes" type="array of string" post={["optional"]}>
      \[早期アクセス] アクセストークンのターゲットスコープセットの現在の値。クライアントグラントから初期化され、現在および後続のActionsでapi.transactionのターゲットスコープメソッドによって即座に更新されます。すべてのActionsが完了すると、これらのスコープはクライアントグラントと共通するものだけが残ります。グラントに含まれないスコープは、最終的なアクセストークンから通知なく除外されます。
    </ResponseField>
  </Expandable>
</ResponseField>
