# Aghanim

{% hint style="warning" %}
This integration is configured only in [Aghanim](https://docs.aghanim.com/aghanim-connect/devtodev/).&#x20;
{% endhint %}

By connecting Aghanim with devtodev, you can track player-generated events from the Game Hub, ensuring precise tracking of user actions across your entire game environment.&#x20;

## Step 1: Configure the Integration in Aghanim <a href="#step-1-configure-the-integration-in-aghanim" id="step-1-configure-the-integration-in-aghanim"></a>

1. Go to the Aghanim Dashboard → **Aghanim Connect** → [**Devtodev**](https://dashboard.aghanim.com/go/app-connect/devtodev).
2. Click the **Install** button to enable the integration.

## Step 2: Add devtodev attributes to `player.verify` webhook response <a href="#step-2-add-devtodev-attributes-to-playerverify-webhook-response" id="step-2-add-devtodev-attributes-to-playerverify-webhook-response"></a>

To ensure devtodev correctly identifies users and attributes their actions on the Game Hub, include the devtodev-specific attributes in the [`player.verify`](https://docs.aghanim.com/webhooks/verify-player) webhook response:

<table><thead><tr><th width="263">Key</th><th width="156">Type</th><th width="224">Description</th><th>Required?</th></tr></thead><tbody><tr><td><code>attributes.devtodev_apikey</code></td><td><code>string</code></td><td>The API key of the project in devtodev. Obtain the API key by going to Settings → SDK → <a href="../../../../reports-and-functionality/project-related-reports-and-fuctionality/settings#integration">Integration</a> in the application menu.</td><td><strong>Yes</strong></td></tr><tr><td><code>attributes.devtodev_device_id</code></td><td><code>DevtodevDeviceId</code></td><td>The device ID object.</td><td><strong>Yes</strong></td></tr></tbody></table>

## **The `DevtodevDeviceId` schema**

The device ID object must contain at least one of the following identifiers:

<table><thead><tr><th width="189">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>devtodevId</code></td><td><code>number</code></td><td>The devtodev ID is the primary numeric identifier for the device/user account in the devtodev database. The <strong>devtodevId</strong> can be obtained from the <a href="../../../integration-of-sdk-v2/setting-up-events/secondary-methods#getting-devtodev-id">devtodev SDK</a>.</td></tr><tr><td><code>userId</code></td><td><code>string</code></td><td>A <strong>custom user ID</strong> assigned by the developer. Usually, a user ID on the developer's server. The ID must be specified during <a href="../../../integration-of-sdk-v2/sdk-integration/android#sdk-initialization">devtodev SDK initialization</a>, or specified using the <a href="../../../integration-of-sdk-v2/setting-up-events/user-profile#user-id">SetUserID method</a>.</td></tr><tr><td><code>advertisingId</code></td><td><code>string</code></td><td>The Advertising ID or IDFA of the user device.</td></tr></tbody></table>

## **Example webhook response**

```json
{
  "player_id": "2D2R-OP3C",
  "name": "Beebee-Ate",
  "level": 42,
  "attributes": {
    "devtodev_apikey": "ak-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "devtodev_device_id": {
      "devtodevId": 123456,
      "userId": "2D2R-OP3C",
      "advertisingId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
  }
}
```

Once the integration is set up, Aghanim will automatically send [Real Payments](https://docs.devtodev.com/server-api/data-api-2.0#real-currency-payment) events to devtodev, allowing you to track user purchases from the game hub.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devtodev.com/integration/autocapture/automatic-payment-tracking/aghanim.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
