# 用户标签

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

* 说明： 通过这个 API，你讲可以查询用户授权的标签数据。不同类型的项目或组织通过 [Relation Protocol](broken://spaces/SjGrUPnpz0dtKyVrOs0l) 发行的 SBTs 被不同的用户持有，同时也证明用户参与了相关的项目或者活动，并与不同类型的项目或组织存在链上关系，我们会根据项目或组织的类型为用户标记对应的标签。比如：Game-Fi、De-Fi 等。该数据需用 [Lit Protocol 解密](/relation-graph/g-zh/guide/use-litprotocol-to-decrypt.md)。
* Header

| Field  | Type   | Required | Remarks                                                |
| ------ | ------ | -------- | ------------------------------------------------------ |
| ApiKey | String | true     | 从管理员获取的 [ApiKey](/relation-graph/g-zh/api/user-tag.md) |

* Request Parameters

| Field           | Type   | Required | Remarks                                                                                                                                        |
| --------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| address         | String | fasle    | EOA Address                                                                                                                                    |
| twitterUsername | String | fasle    | twitter username                                                                                                                               |
| steamId         | String | fasle    | steamId                                                                                                                                        |
| sig             | String | true     | 用户授权信息签名（签名可参考[SIWE](https://docs.login.xyz/),带有授权信息时，开发者可[使用 Lit Protocol 对返回结果解密](/relation-graph/g-zh/guide/use-litprotocol-to-decrypt.md)） |
| message         | String | true     | 用户授权信息签名原文（签名原文拼接可参考[SIWE](https://docs.login.xyz/),其中statement字段需要为:**Access to User Tag.**)）                                                 |

* Request Example

```shell
curl  GET 'https://api.relationlabs.ai/api/v1/tag?address=0x9bd286ef4e3d9ec1af6c6ae9da2f0b3617deab13&sig=0x0011111&message=example.com%20wants%20you%20to%20sign%20in%20with...' \
--header 'ApiKey: <ApiKey>'
```

* Response Parameters

| Field | Type          | Remarks                               |
| ----- | ------------- | ------------------------------------- |
| code  | String        | 返回码                                   |
| desc  | String        | 返回信息                                  |
| data  | EncryptedData | 使用 Lit Protocol 加密过的Tag数据，需要向用户申请授权解密 |

EncryptedData解密后的数据结构

```json
[
  "DAO",
  "Defi",
  "game"
]
```

* Response Body

```json
{
  "code": "0",
  "desc": "success",
  "data": {
    "encryptedString": "xxx",
    "encryptedSymmetricKey": "xxx"
  }
}
```

* Return Code

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


---

# 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://relationlabs.gitbook.io/relation-graph/g-zh/api/user-tag.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.
