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