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

> Learn about the credentials-exchange Action trigger's event object, which provides contextual information about the trigger execution.

# Event Object

The `event` object for the credentials-exchange Actions trigger provides contextual information about the trigger execution.

<RequestExample>
  ```json Event Object theme={null}
  {
    "client": { "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", "name": "My M2M App" },
    "resource_server": { "identifier": "https://api.example.com" },
    "transaction": { "requested_scopes": ["read:reports"] },
    "accessToken": { "scope": ["read:reports"], "customClaims": {} },
    "request": { "ip": "13.33.86.1", "hostname": "your-tenant.us.auth0.com" },
    "organization": { "id": "org_abc123", "name": "acme" },
    "custom_domain": { "name": "auth.example.com" },
    "tenant": { "id": "your-tenant" },
    "secrets": {}
  }
  ```
</RequestExample>

## `event.accessToken`

<ResponseField name="event.accessToken" type="dictionary">
  Information about the access token to be issued.

  <Expandable title="accessToken properties" defaultOpen>
    <ResponseField name="customClaims" type="dictionary" />

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

## `event.client`

<ResponseField name="event.client" type="dictionary">
  Information about the Client used during this token exchange.

  <Expandable title="client properties" defaultOpen>
    <ResponseField name="client_id" type="string">
      The client id of the application the user is logging in to.
    </ResponseField>

    <ResponseField name="metadata" type="dictionary">
      An object for holding other application properties.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the application (as defined in the Dashboard).
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.custom_domain`

<ResponseField name="event.custom_domain" type="dictionary" post={["optional"]}>
  Details about the custom domain associated with the current transaction.

  <Expandable title="custom_domain properties" defaultOpen>
    <ResponseField name="domain" type="string">
      The custom domain name.
    </ResponseField>

    <ResponseField name="domain_metadata" type="dictionary">
      Custom domain metadata as key-value pairs.
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.organization`

<ResponseField name="event.organization" type="dictionary" post={["optional"]}>
  Details about the Organization associated with the current transaction.

  <Expandable title="organization properties" defaultOpen>
    <ResponseField name="id" type="string">
      The Organization identifier.
    </ResponseField>

    <ResponseField name="display_name" type="string">
      The friendly name of the Organization.
    </ResponseField>

    <ResponseField name="metadata" type="dictionary">
      Metadata associated with the Organization.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the Organization.
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.request`

<ResponseField name="event.request" type="dictionary">
  Details about the request that initiated the transaction.

  <Expandable title="request properties" defaultOpen>
    <ResponseField name="body" type="dictionary">
      The body of the POST request. This data will only be available during refresh token, Client Credential Exchange flows and PreUserRegistration Action.
    </ResponseField>

    <ResponseField name="geoip" type="dictionary">
      <Expandable title="geoip properties" 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"]}>
      The hostname that is being used for the authentication flow.
    </ResponseField>

    <ResponseField name="ip" type="string">
      The originating IP address of the request.
    </ResponseField>

    <ResponseField name="language" type="string" post={["optional"]}>
      The language requested by the browser.
    </ResponseField>

    <ResponseField name="method" type="string">
      The HTTP method used for the request
    </ResponseField>

    <ResponseField name="user_agent" type="string" post={["optional"]}>
      The value of the `User-Agent` header received when initiating the transaction.
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.resource_server`

<ResponseField name="event.resource_server" type="object">
  Information about the Resource Server that is issuing the access token.

  <Expandable title="resource_server properties" defaultOpen>
    <ResponseField name="identifier" type="string">
      The identifier of the resource server. For example: `https://your-api.example.com`.
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.secrets`

<ResponseField name="event.secrets" type="secrets">
  Secret values securely associated with this Action.
</ResponseField>

## `event.tenant`

<ResponseField name="event.tenant" type="object">
  Information about the Tenant used during this token exchange.

  <Expandable title="tenant properties" defaultOpen>
    <ResponseField name="id" type="string">
      The name of the tenant.
    </ResponseField>
  </Expandable>
</ResponseField>

## `event.transaction`

<ResponseField name="event.transaction" type="object">
  Information about the Credentials Exchange transaction.

  <Expandable title="transaction properties" defaultOpen>
    <ResponseField name="correlation_id" type="string" post={["optional"]}>
      Correlation ID can be provided in the initial authentication request when the application redirects to Universal Login. You can use value to correlate logs and requests from your Action code with the user flow.
    </ResponseField>

    <ResponseField name="requested_scopes" type="array of strings">
      The scopes specified (if any) when requesting the access token.
    </ResponseField>

    <ResponseField name="target_scopes" type="array of strings" post={["optional"]}>
      \[Early Access] The live target scope set for the access token. Initialized from the client grants and immediately updated by api.transaction target scope methods across current and subsequent Actions. After all Actions complete, these scopes are intersected with the client grant. Scopes not present in the grant are silently dropped from the final access token.
    </ResponseField>
  </Expandable>
</ResponseField>
