Join And Get Free Trial!

getBalance#


Description of getBalance method

API endpoint: https://api.nextcaptcha.com/getBalance

method: POST

Content type: application/json

Request properties#

nametypeRequiredDescription
clientKeyStringYesYour API key

Request example#

{
   "clientKey": "api key"
}

Response example#

{
   "errorId": 0,
   "balance": "12.34"
}

Sample Code#

# https://github.com/nextcaptcha/nextcaptcha-python
 
import os
import sys
from nextcaptcha import NextCaptchaAPI
 
client_key = os.getenv('NEXTCAPTCHA_KEY', "YOUR_CLIENT_KEY")
 
api = NextCaptchaAPI(client_key=client_key)
try:
  balance = api.get_balance()
except Exception as e:
  sys.exit(e)
 
else:
  sys.exit('Account balance: ' + str(balance))