API-eindpunt: https://api.nextcaptcha.com/getBalance
methode: POST
Inhoudstype: application/json
naam | type | Vereist | Beschrijving |
---|---|---|---|
clientKey | Snaar | Ja | Uw API-sleutel |
{
"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}");