Skip to main content

Moment

The API related to moment

GEThttps://open.debox.pro/openapi/moment/praise_info

Get the like information of all moments posted by the user corresponding to the current address

Request Example:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/praise_info?\
wallet_address=0x2267......&chain_id=1"

Parameters

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

wallet_address : Wallet address, representing a user

chain_id : Blockchain network ID, default value 1, Ethereum mainnet

Responses

200: OK
# receive_praise_total  The total number of likes some one has received
# send_praise_total The total number of likes that some one gives to others
{
"code": 1,
"data": {
"receive_praise_total": 46,
"send_praise_total": 208
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/moment/give_praise

Whether a user likes a moment

Request Example:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/give_praise?\
wallet_address=0x2267......&chain_id=1&moment_id=oo0epx1p"

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

wallet_address : Wallet address, representing a user

chain_id : Blockchain network ID, default value 1, Ethereum mainnet

moment_id : Moment ID: representing a moment

Responses

200: OK
# is_praise  Whether liked
{
"code": 1,
"data": {
"is_praise": false
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/moment/receive_praise

Gets the total number of likes for a Moment

Request Example:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/receive_praise?moment_id=oo0epx1p"

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

wallet_address : Wallet address, representing a user

chain_id : Blockchain network ID, default value 1, Ethereum mainnet

moment_id : Moment ID: representing a Moment

Responses

200: OK
# receive_praise_total  Number of likes
{
"code": 1,
"data": {
"receive_praise_total": 5
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}