绑定地址

POST /api/v1/bindAddress

  • 说明: 用户绑定一个新地址

  • Header

Field
Type
Remarks

ApiKey

String

Authorization

String

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

I-Authorization

String

Bearer ${addressAuthToken},其中addressAuthToken是使用待绑定的私钥签名,再通过JS-SDK请求签名认证获取

  • Request Example

curl POST 'https://api.relationlabs.ai/api/v1/bindAddress' \
--header 'I-Authorization: Bearer eyJ0eXA1iOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJleHAiOjE2NzA4ODk0NDEsImlhdCI6MTY2MDgwOTQ0MSwiaXNzIjoicmVsYXRpb25sYWJzLmFpIiwic3ViIjoiMHgxZTU2MmFhYzRiZWFjNDUwYWI5OGQzNzlhYjBkMWQxYjQ0YzMyNWIzIiwid2FsbGV0TmFtZSI6Im1ldGFt1YXNrIiwiY2hhaW5OYW1lIjoiZXRoIn0.2wFJmR2D3inHMItBugoaVE3MOSLnG1ylJEyU38WU0Gg1LIqajhzvcYYHC5ah3r7-FFBhbWGk9WW3KxN_h5K1zZA' \
--header 'ApiKey:  <ApiKey>' \
--header 'Authorization: bearer eyJhbG1ciOiJFUzI1NiJ9.eyJqdGkiOiJhMzE2ZWZiMGM1Njg0Nj1QyOWNjNTliZDRiNjJiZTMwZiIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2MTMyMzM5NCwic3ViIjoiYmFmMzQta2lhYWEtYWFhYWstYWNnamEtY2FpIiwiZXhwIjoxNjYxOTI4MTk0fQ.xFTZ7iledMt8ZRepm64EiY6eajGGJQ5YhwCLM-gC5qpABCEsji282WP72e92ZmBlUJwVAZ-K81TUmaNcCbc-lYg'
  • Response Parameters

Field
Type
Remarks

code

String

返回码

desc

String

返回信息

data

Object

数据

  • Response Body

{
  "code": "0",
  "desc": "success",
  "data": null
}
  • Return Code

code
desc
Remarks

0

success

接口调用成功

11201

address is already bound

当前地址已经绑定

Last updated