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))
// https://github.com/nextcaptcha/nextcaptcha-go
package main
import (
"fmt"
"log"
"github.com/nextcaptcha/nextcaptcha-go"
)
func main() {
api := nextcaptcha.NewNextCaptchaAPI("API_KEY")
balance, err := api.GetBalance()
if err != nil {
log.Fatal(err);
}
fmt.Println("Account balance "+balance)
}
// https://github.com/nextcaptcha/nextcaptcha-csharp
string clientKey = "YOUR_CLIENT_KEY";
string solftId = ""; // Optional
string callbackUrl = ""; // Optional
bool openLog = true; // Optional
var nextCaptchaAPI = new NextCaptchaAPI(clientKey, solftId, callbackUrl, openLog);
string balance = await nextCaptchaAPI.GetBalanceAsync();
Console.WriteLine($"Account balance: {balance}");