Join And Get Free Trial!

getBalance#


getBalance方法描述

API 端点: https://api.nextcaptcha.com/getBalance

方法: POST

内容类型: application/json

请求属性#

名称类型必须使用的描述
clientKey字符串是的你的API密钥

请求示例#

{
   "clientKey": "api key"
}

响应示例#

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

示例代码#

# 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))