# 查询用户持有的SBT

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

* 说明： 查询用户持有的 SBT 列表以及 SBT 元数据
* Header

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

* Request Parameters

| Field           | Type   | Required | Remarks          |
| --------------- | ------ | -------- | ---------------- |
| address         | String | fasle    | EOA Address      |
| twitterUsername | String | fasle    | twitter username |
| steamId         | String | fasle    | steamId          |

* Request Example

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

* Response Parameters

| Field | Type   | Remarks |
| ----- | ------ | ------- |
| code  | String | 返回码     |
| desc  | String | 返回信息    |
| data  | List   | 数据      |

SBT字段如下:

| Field           | Type   | Remarks  |
| --------------- | ------ | -------- |
| contractAddress | String | SBT合约地址  |
| sbtName         | String | SBT Name |
| tokenId         | String | tokenId  |
| rdfData         | String | 语义数据     |
| imageUrl        | String | imageUrl |
| metadataUrl     | String | 元数据 url  |

* Response Body

```json
{
  "code": "0",
  "desc": "success",
  "data": [
    {
      "contractAddress": "0x1dcc0fbb80d2c6a62ee35835e03c98924d413153",
      "sbtName": "Relation Medal Not Alone",
      "tokenId": "32945",
      "imageUrl": "https://3fypb-gqaaa-aaaag-aaedq-cai.ic1.io/icon/medal/medal_5.png",
      "rdfData": ":Soul_0x9c880a0df075b2a2dc5ec9b5aeb2f0215963f14b p:achieved :relation-medal_not-alone-level1.",
      "metadataUrl": "https://z.com/aa.json"
    }
  ]
}
```

* Return Code

| code  | desc    | Remarks                                   |
| ----- | ------- | ----------------------------------------- |
| 0     | success | the flag for a successful request         |
| 11601 | failed  | this field not support in current version |
| 11602 | failed  | user not found                            |


---

# 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/sbt-list.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.
