用户信息

GET /api/v1/userInfo

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

  • Header

Field
Type
Required
Remarks

ApiKey

String

true

从管理员获取的ApiKey

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

  • 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

Last updated