使用兑换码
curl --request POST \
--url https://zero.cat/api/user/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"key": ""
}'import requests
url = "https://zero.cat/api/user/topup"
payload = { "key": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: ''})
};
fetch('https://zero.cat/api/user/topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"data": 500000
}充值与兑换
使用兑换码
需要个人访问令牌,作用域:wallet:write(钱包 → 编辑)。
兑换成功后,额度直接计入账户余额。
POST
/
api
/
user
/
topup
使用兑换码
curl --request POST \
--url https://zero.cat/api/user/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"key": ""
}'import requests
url = "https://zero.cat/api/user/topup"
payload = { "key": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: ''})
};
fetch('https://zero.cat/api/user/topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"data": 500000
}
