Developer Hub
Relation ProtocolRelation ONE APIRelation Graph API
中文
中文
  • 概述
    • Relation ONE
  • 开发指引
    • 名词解释
    • 服务地址
    • 鉴权与限流
    • JS-SDK使用说明
    • 快速开始
  • Relation ONE IM 介绍
  • API
    • 介绍
    • 签名认证
    • 登录认证
    • 用户信息
      • 绑定地址
      • 解绑地址
      • 用户信息
      • 查询地址
      • 查询Web2账户
    • 好友关系
      • 关注
      • 取关
      • 粉丝列表
      • 关注列表
      • 根据Web3地址查询粉丝列表
      • 根据Web3地址查询关注列表
    • 用户推荐
    • 群组管理
      • 创建
      • 加入
      • 移除
      • 离开
      • 解散
      • 转移管理员
      • 详情
      • 成员列表
      • 是否为管理员
      • 查询群公告
      • 设置群公告
    • 聊天管理
      • 置顶
      • 免打扰
      • 列表
      • 隐藏
    • 消息管理
      • 发消息
      • 读消息
      • 删除消息
      • 消息列表
      • 未读消息数
  • JS-SDK
    • Relation-Auth
      • 快速开始
      • 方法
    • IM-JS-SDK
      • 快速开始
      • 静态方法
      • 事件
      • 方法
      • 消息解析
    • Plugin-JS-SDK
      • 快速开始
  • 附录
    • 接口错误码
    • 合约列表
Powered by GitBook
On this page
  1. API
  2. 用户信息

用户信息

GET /api/v1/userInfo

  • 说明: 返回用户个人信息,参数为空即查询当前访问的用户

  • Header

Field
Type
Required
Remarks

ApiKey

String

true

Authorization

String

false

Bearer ${unifiedAuthToken} ,其中unifiedAuthToken来自/api/v1/auth接口的返回

  • Request Parameters

Field
Type
Required
Remarks

address

String

false

relationId or address。此参数与Authorization二选一

fields

List[String]

false

可选,填写需要返回的用户字段,value: CREATE_AT、FOLLOW_COUNT、ADDRESS_WITH_CHAIN

  • Request Example

curl  GET 'https://api.relationlabs.ai/api/v1/userInfo?address=0x9bd286ef4e3d9ec1af6c6ae9da2f0b3617deab13' \
--header 'ApiKey: <ApiKey>'
  • Response Parameters

Field
Type
Remarks

code

String

返回码

desc

String

返回信息

data

UserInfo

数据

The UserInfo field consists of the following subfields:

Field
Type
Remarks

name

String

用户姓名

avatar

String

用户头像

relationId

String

用户的relationId

createdAt

String

用户的注册时间

followCount

FollowCount

用户的following、follower统计数据

└─followingCount

Integer

用户following的总数

└─followerCount

Integer

用户follower的总数

addressWithChain

AddressWithChain

用户的地址信息列表,其中包含所属的链

└─address

String

└─chainName

String

所属的链名称。当前支持的链:eth、polygon、bsc、op、moonbeam、solana、flow、substrate、ic、

The FollowCount field consists of the following subfields:

Field
Type
Remarks

name

String

用户姓名

followingCount

Integer

用户following的总数

followerCount

Integer

用户follower的总数

The AddressWithChain field consists of the following subfields:

Field
Type
Remarks

name

String

用户姓名

address

String

用户地址

chainName

String

所属的链名称。当前支持的链:eth、polygon、bsc、op、moonbeam、solana、flow、substrate、ic、

  • Response Body

{
    "code": "0",
    "desc": "success",
    "data": {
        "relationId": "d4swz-zaaaa-aaaaj-at5fa-cai",
        "name": "test_user",
        "avatar": "https://3fypb-gqaaa-aaaag-aaedq-cai.ic1.io/nft/eth/relation-test-club/16.png",
        "createdAt": "2022-08-18 16:54:15",
        "followCount": {
            "followingCount": 10,
            "followerCount": 30
        },
        "addressWithChain": [
            {
                "address": "0x1152e0eebd5d2b98da5d1ed7d1ce066c20a4e430",
                "chainName": "eth"
            }
        ]
    }
}
  • 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

Previous解绑地址Next查询地址

Last updated 1 year ago

从管理员获取的

ApiKey