Documentation

Getting Balance

Method #1

Getting balance via a link as a string:

http://app.botlab.me/getbalance?key=APIKEY
20.00

Getting balance via a link in JSON format:

http://app.botlab.me/getbalance?key=APIKEY&json=1
{
    "status": 1,
    "response": 100
}

Method #2

To get balance information using the Capsola API, execute an HTTP GET/POST request to the address http://app.botlab.me/balance.

1. Create a request Use any tool for creating HTTP requests. For example, you can use Postman or write code to send the request.

2. Specify the host and headers

Ensure that the following values are specified in the request header: Host: app.botlab.me Content-Type: application/json X-API-Key: API_KEY

3. Formulate the request body

The request body should be empty, as no additional data is required to get the balance.

4. Send the request

Send an HTTP GET request to the address http://app.botlab.me/balance.

5. Receive the response

The request result will be presented in JSON format.

<u>Response Examples</u>

Successful response:

{
    "status": 1,
    "response": 100
}

In this example, status is 1, which indicates successful request execution, and response is 100, which represents the current balance.

Error response:

{
    "status": 0,
    "response": "ERROR_KEY"
}

If an error occurs, status will be 0, and the response field will contain the error code (in this case ERROR_KEY).