> For the complete documentation index, see [llms.txt](https://relationlabs.gitbook.io/relation-graph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://relationlabs.gitbook.io/relation-graph/api/unified-dentity-verification.md).

# Unified Identity Verification

## <mark style="color:blue;">GET</mark> /api/v1/unifiedIdentityVerification

* Through this API, platforms and developers are allowed to determine whether multiple addresses from different platforms or chains might be linked to the same user. This determination is based on calculations using data from users who have voluntarily connected and registered on the Relation Graph. The API respects user privacy and only operates on data that users willingly share. It does not provide any definitive claims but offers a probability score based on data interconnectivity.

> Probability Score Calculation Formula:
>
> P = w1 × S\_common + w2 × S\_interaction + w3 × S\_registration​
>
> * P is the total probability score.
> * S\_common is the common relationship score.
> * S\_interaction is the interaction pattern score.
> * S\_registration is the registration data score.
> * w1,w2,w3 are the weights of each score, summing up to 1.
>
> Score Calculation:
>
> * S\_common (Common Relationship Score): Calculated based on the number of direct relationships shared by two addresses. For example, if Address A and Address B both follow 10 of the same users, the common relationship score is 10. S\_common = Number of Common Relationships.
> * S\_interaction (Interaction Pattern Score): Calculated based on the number of interactions both addresses have with the same contracts or NFTs. For instance, if Address A and Address B both interacted with 3 of the same contracts, the interaction pattern score is 3. S\_interaction = Number of Common Contract Interactions.
> * S\_registration (Registration Data Score): If both addresses are associated with the same Twitter or Discord account, the registration data score is 1, otherwise, it's 0. S\_registration = 1 (if both addresses are linked to the same account) S\_registration = 0 (in other cases).
> * Weight Distribution: w1 = 0.4 (Common Relationship Weight)；w2 = 0.4 (Interaction Pattern Weight) ；w3 = 0.2 (Registration Data Weight).
>
> Cluster Calculation:&#x20;
>
> * Pairwise Comparison: All input addresses are compared pairwise, and their reference scores are calculated using the probability score formula.&#x20;
> * Threshold Filtering: Based on a preset threshold, pairs of addresses with scores exceeding the threshold are selected.&#x20;
> * Address Clustering: Using the single-link clustering algorithm, pairs of addresses with scores above the threshold are clustered. Similar addresses are grouped together. Return Cluster Results: The API returns the address list for each cluster group and the average reference score for that group.&#x20;
> * Example: Suppose there are four input addresses: A, B, C, D. After pairwise comparison, we obtain the following scores:&#x20;
>   * A-B: 0.9&#x20;
>   * A-C: 0.2&#x20;
>   * A-D: 0.85 B-C: 0.1 B-D: 0.88 C-D: 0.15 Assuming our threshold is 0.8, the pairs A-B, A-D, and B-D all have scores exceeding the threshold. After clustering, we obtain two cluster groups: {A, B, D} and {C}.

* Header

| Field  | Type   | Required | Remarks                                                                                       |
| ------ | ------ | -------- | --------------------------------------------------------------------------------------------- |
| ApiKey | String | true     | [ApiKey](/relation-graph/api/unified-dentity-verification.md) obtained from the administrator |

* Request Parameters

| Field   | Type | Required | Remarks     |
| ------- | ---- | -------- | ----------- |
| address | List | true     | EOA Address |

* Request Example

```shell
curl  GET 'https://api.relationlabs.ai/api/v1/unifiedIdentityVerification?address=0x9bd286ef4e3d9ec1af6c6ae9da2f0b3617deab13,0xbbb' \
--header 'ApiKey: <ApiKey>'
```

* Response Parameters

| Field | Type   | Remarks        |
| ----- | ------ | -------------- |
| code  | String | Return code    |
| desc  | String | Return message |
| data  | double | Data           |

* Response Body

```json
{
  "code": "0",
  "desc": "success",
  "data": [
    {
      "address": ["0x00001","0x00002"],
      "averageScore": 1.76
    },
    {
      "address": ["0x00003"],
      "averageScore": 0.53
    }
  ]
}
```

* Return Code

| code | desc    | Remarks                           |
| ---- | ------- | --------------------------------- |
| 0    | success | the flag for a successful request |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://relationlabs.gitbook.io/relation-graph/api/unified-dentity-verification.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.
