Skip to content

getBalance

getBalance returns your remaining points (1,000 points = ¥1) and your developer revenue share and referral reward balances (in CNY). It is free, so it is also the usual way to check that a clientKey is correct.

POSThttps://api.yescaptcha.com/getBalanceGlobal endpoint
POSThttps://cn.yescaptcha.com/getBalanceChina endpoint
Field Type Required Description
clientKey string Yes Your account key
{ "clientKey": "YOUR_CLIENT_KEY" }
{
"errorId": 0,
"balance": 1071810,
"softBalance": 36.0098,
"inviteBalance": 0,
"inviteBy": 0
}
Field Type Description
balance integer Balance in points (1,000 points = ¥1). Must be above 10 points to create tasks
softBalance number Developer revenue share balance in CNY; see Developer revenue share
inviteBalance number Referral reward balance in CNY; see Referral program
inviteBy integer User ID of the person who invited you, 0 if none

A wrong clientKey returns ERROR_KEY_DOES_NOT_EXIST. getBalance is affected by automatic pauses: during a pause it returns ERROR_IP_BLOCKED_5MIN.

get-balance.sh
#!/usr/bin/env bash
# Check the balance. getBalance is free and is a quick way to verify your clientKey
set -euo pipefail
curl -s https://api.yescaptcha.com/getBalance \
-H 'Content-Type: application/json' \
-d "{\"clientKey\": \"${YESCAPTCHA_CLIENT_KEY}\"}"
echo