UserInformation
Get the user's nickname, avatar, and wallet address
API about user information If you want to query information about a user, you can use the following interfaces.
POSThttps://open.debox.pro/openapi/user/info
Get the basic user information,POST Method,use access_token to verify,
After the Api combined with the login authorization and authorization, the obtained information is requested to obtain the user's basic information with the obtained access_token and User_id requesting this Api, such as nicknames, avatars, wallet_address.
Request Example:
curl --location --request POST 'https://open.debox.pro/openapi/user/info?user_id=lx....' \
--header 'access_token: eyJhxxCJ9.eyxxJ9.hWxxQ'
After the Api combined with the login authorization and authorization, the obtained information is requested to obtain the user's basic information with the obtained access_token and User_id requesting this Api, such as nicknames, avatars, wallet_address.
Request Example:
curl --location --request POST 'https://open.debox.pro/openapi/user/info?user_id=lx....' \
--header 'access_token: eyJhxxCJ9.eyxxJ9.hWxxQ'
Parameters
Header
app_id
: String
Unique app identifier, obtain from DeBox Open Platform
X-API-KEY
: String
Developer API Key, obtain from DeBox Open Platform
nonce
: String
Random number, 8 digits long
timestamp
: String
Timestamp, accurate to milliseconds
signature
: String
sha1 calculated signature, must strictly follow the signature calculation rules below
Signature calculation rules:
// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)
Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.
Query
user_id
: String
The user_id which can be obtained during login authorization
Responses
200: OK
{
"code": 1,
"data": {
"name": "ltx", // nickname
"wallet_address": "0xsadf......34df", // wallet address
"avatar": "https://data.debox.space/nfts/0x67a7f09c/699-1.png",// avatar
"uid": "fxidfef4" // equal to user_id
},
"message": "success",
"success": true
}
GEThttps://open.debox.pro/openapi/user/info
Obtain user base information
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/info?user_id=uvg2p6ho"
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/info?user_id=uvg2p6ho"
Parameters
Header
app_id
: String
Unique app identifier, obtain from DeBox Open Platform
X-API-KEY
: String
Developer API Key, obtain from DeBox Open Platform
nonce
: String
Random number, 8 digits long
timestamp
: String
Timestamp, accurate to milliseconds
signature
: String
sha1 calculated signature, must strictly follow the signature calculation rules below
Signature calculation rules:
// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)
Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.
Query
user_id
: String
Userid of the user. The userid of the authorized user, can be obtained during login authorization
Responses
200: OK
{
"code": 1,
"data": {
"name": "ltx", // user name
"wallet_address": "0xsadf......34df", // wallet address
"avatar": "https://data.debox.space/nfts/0x67a7f09c/699-1.png",// user header image
"uid": "fxidfef4" // the same to user_id
},
"message": "success",
"success": true
}
GEThttps://open.debox.pro/openapi/user/followers
To obtain the followers of Debox users bound by the developer account,
note that the API can only get the follow-up list of the debox user corresponding to the X-API-Key:
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/followers?page=1&size=20"
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/followers?page=1&size=20"
Parameters
Header
app_id
: String
Unique app identifier, obtain from DeBox Open Platform
X-API-KEY
: String
Developer API Key, obtain from DeBox Open Platform
nonce
: String
Random number, 8 digits long
timestamp
: String
Timestamp, accurate to milliseconds
signature
: String
sha1 calculated signature, must strictly follow the signature calculation rules below
Signature calculation rules:
// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)
Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.
Query
page
: Numeric
Number of pages of pagination query
size
: Numeric
Each page size
Responses
200: OK
{
"code": 1,
"data": [
{
"name": "zhang3",
"wallet_address": "0x22b15300cf8...2562bea2",
"avatar": "https://data.debox.pro/.../headimg.png",
"uid": "0mb...bc"
},
{
"name": "Lee4",
"wallet_address": "0xb63219a8e0d3...f2cd459f",
"avatar": "https://data.debox.pro/.../headimg.png",
"uid": "xq6...pg"
}
],
"message": "success",
"success": true
}
GEThttps://open.debox.pro/openapi/user/is_follow
Verify whether a user is following another user
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/is_follow?\
walletAddress=0x2267......&chain_id=1&followAddress=0xB63219a8E0D367d87BA1c8B0736CbfDbf2cD459F"
Request Example:
curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/user/is_follow?\
walletAddress=0x2267......&chain_id=1&followAddress=0xB63219a8E0D367d87BA1c8B0736CbfDbf2cD459F"
Parameters
Header
app_id
: String
Unique app identifier, obtain from DeBox Open Platform
X-API-KEY
: String
Developer API Key, obtain from DeBox Open Platform
nonce
: String
Random number, 8 digits long
timestamp
: String
Timestamp, accurate to milliseconds
signature
: String
sha1 calculated signature, must strictly follow the signature calculation rules below
Signature calculation rules:
// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)
Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.
Query
walletAddress
: The follower's wallet address
followAddress
: The wallet address of the person being followed
Responses
200: OK
{"case3702":false}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}
401: Unauthorized
{"error":"Bad Request","code":401,"message":"Param error"}