Introduction
InfoSMS.online provides a simple REST API for sending and receiving SMS messages. The API supports JSON and XML formats and is compatible with the SMSGateway standard.
Base URL
https://infosms.online
Supported formats
- JSON — preferred format, header
Content-Type: application/json - XML — compatibility with older integrations
- form-data — for simple POST requests
Authentication
InfoSMS.online distinguishes two types of API keys by purpose:
1. Sender API key (akey) — for SMS Gateway and simple SIM Hosting
Assigned to a specific sender or SIM card. Find it in the admin panel for the specific SIM account (mdl_user.akey). Used with parameters username + password (or directly as akey instead of password if it has more than 30 characters).
| Parameter | Type | Description | |
|---|---|---|---|
| username | string | required | Login email |
| password | string | required | API key (sender akey of the SIM card) |
2. Account API key (account_akey) — for reseller multi-sender bulk
Belongs to the entire client account (not a single SIM card). Find it in the portal under the 🔑 API Key section. Allows sending bulk SMS via API — you can assign a different sender to each message. Used with parameters username + account_akey.
| Parameter | Type | Description | |
|---|---|---|---|
| username | string | required | Client account login email |
| account_akey | string | required | Account API key (generated in the portal, section 🔑 API Key) |
/api/bulk/, /api/balance/ and /api/status/ use shortened parameter names user (= username) and pass (= account_akey) for the same account key — it is the same key as above.Request format
The API accepts requests in JSON or XML format. Responses are returned in the same format as the request.
Phone numbers
The recipient number (to) must be in international format with country code, including the + sign:
| Formát | Príklad | Podporovaný |
|---|---|---|
| Medzinárodný + | +421905123456 | ✅ Áno |
Other formats (without +, local formats like 0905123456 or 905123456) are not accepted — a request with such a number will be rejected with error INVALID_NUMBER.
Message encoding
By default, diacritics are automatically normalized (á→a, č→c...). For Unicode SMS set parameter unicode=1 — pricing applies the Unicode limit (70 characters/SMS).
Error codes
SMS gateway endpoints (/api/bulk/, /api/sim/send.php, /api/balance/, /api/account/...) return errors in a unified format {"status":"ERR"|"ERROR","msg"|"message":"error description"} (or equivalent XML element <status>ERR</status>). HTTP status code 200 is also returned on partial failure within a bulk send (see the errors field).
| HTTP | status | Description |
|---|---|---|
| 200 | OK | Successful processing (including partial failure in the errors field) |
| 400 | ERR / ERROR | Missing or invalid parameters (e.g. missing text, empty numbers) |
| 401 | ERR / ERROR | Invalid credentials (user/pass) |
| 200 | ERR | Insufficient credit — the error text contains the current balance |
| 200 | errors[] | Invalid phone number in a bulk send — other numbers are sent normally |
| 404 | ERR | Record not found (e.g. /api/status/ — non-existent msgid) |
Send SMS
Sends an SMS to one or more recipients. The endpoint is the same for a single SMS and for bulk sending — the only difference is the number of entries in the numbers field (for a single SMS, a one-element array is sufficient).
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
| user | string | required | Login email |
| pass | string | required | API key (account_akey, section 🔑 API Key in the portal) |
| numbers | array | required | Array of phone numbers — for a single SMS a one-element array is sufficient (max 1,000) |
| text | string | required | Message text |
| from | string | optional | Sender ID (max 11 characters, alphanumeric). Defaults to the company name from the portal. |
Content-Type header (application/json or application/xml / text/xml). The response is returned in the same format as the request.msgid to each number (e.g. an order ID) to look up delivery status via Delivery status. If you do not send msgid, we generate and return a unique ID.Example request (single SMS)
POST /api/bulk/ Content-Type: application/json { "user": "vas@email.sk", "pass": "vas-api-kluc", "numbers": [{ "number": "+421905123456", "msgid": "objednavka-1234" }], "text": "Vaša objednávka č. 1234 je pripravená na vyzdvihnutie.", "from": "MojaFirma" }
POST /api/bulk/ Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <credential> <user>vas@email.sk</user> <pass>vas-api-kluc</pass> </credential> <message> <text>Vasa objednavka c. 1234 je pripravena na vyzdvihnutie.</text> <from>MojaFirma</from> <numbers> <number msgid="objednavka-1234">+421905123456</number> </numbers> </message> </request>
Response (success)
{
"status": "OK",
"sent": 1,
"failed": 0,
"credit": 4.2350,
"results": [
{ "number": "+421905123456", "msgid": "objednavka-1234" }
]
}
<?xml version="1.0" encoding="UTF-8"?> <response> <status>OK</status> <sent>1</sent> <failed>0</failed> <credit>4.2350</credit> <results> <result><number>+421905123456</number><msgid>objednavka-1234</msgid></result> </results> </response>
For sending to multiple recipients at once (max 1,000 numbers) and a description of partial failure see the Bulk send section.
Bulk send
Sends the same message to multiple numbers at once. Maximum 1,000 numbers per request.
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
| user | string | required | Login email |
| pass | string | required | API key (account_akey) |
| numbers | array | required | Array of phone numbers (max 1,000) |
| text | string | required | Message text |
| from | string | optional | Sender ID |
Content-Type header (application/json or application/xml / text/xml). The response is returned in the same format as the request.numbers can be either a plain string (phone number) or an object {"number": "...", "msgid": "..."} with a custom message ID. If you do not send msgid, we generate and return a unique ID — in both cases you will find it in results[].msgid and can use it to query via Delivery status.Example request
POST /api/bulk/ Content-Type: application/json { "user": "vas@email.sk", "pass": "vas-api-kluc", "numbers": [ { "number": "+421905111111", "msgid": "klient-1001" }, { "number": "+421905222222", "msgid": "klient-1002" }, "+421905333333" ], "text": "Akcia: -30% na všetky produkty do konca týždňa!", "from": "MojaFirma" }
POST /api/bulk/ Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <credential> <user>vas@email.sk</user> <pass>vas-api-kluc</pass> </credential> <message> <text>Akcia: -30% na vsetky produkty do konca tyzdna!</text> <from>MojaFirma</from> <numbers> <number msgid="klient-1001">+421905111111</number> <number msgid="klient-1002">+421905222222</number> <number>+421905333333</number> </numbers> </message> </request>
Response (success)
{
"status": "OK",
"sent": 3,
"failed": 0,
"credit": 3.9850,
"results": [
{ "number": "+421905111111", "msgid": "klient-1001" },
{ "number": "+421905222222", "msgid": "klient-1002" },
{ "number": "+421905333333", "msgid": "11087" }
]
}
<?xml version="1.0" encoding="UTF-8"?> <response> <status>OK</status> <sent>3</sent> <failed>0</failed> <credit>3.9850</credit> <results> <result><number>+421905111111</number><msgid>klient-1001</msgid></result> <result><number>+421905222222</number><msgid>klient-1002</msgid></result> <result><number>+421905333333</number><msgid>11087</msgid></result> </results> </response>
Response (partial failure)
If a number is invalid or a message fails to send, the response will include an errors field with the reason for each failed number — other numbers in the batch are sent normally.
{
"status": "OK",
"sent": 2,
"failed": 1,
"credit": 3.9850,
"errors": [
{ "number": "+421900111222", "msg": "Neplatné telefónne číslo: +421900111222" }
]
}
<?xml version="1.0" encoding="UTF-8"?> <response> <status>OK</status> <sent>2</sent> <failed>1</failed> <credit>3.9850</credit> <errors> <error><number>+421900111222</number><msg>Neplatné telefónne číslo: +421900111222</msg></error> </errors> </response>
Delivery status
Returns the current delivery status of an SMS by msgid — values from results[].msgid in the Send SMS / Bulk send response (your own ID or our generated one).
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
| user | string | required | Login email |
| pass | string | required | API key (account_akey) |
| msgid | string | required | Message ID from results[].msgid when sending |
| delivery_status | Description |
|---|---|
pending | Waiting to be sent / status not yet confirmed |
accepted | Accepted by the operator network (SMSC) |
delivered | Delivered to recipient |
failed | Failed to deliver |
expired | Message validity expired |
error | Routing error |
Example request
GET /api/status/?user=vas@email.sk&pass=vas-api-kluc&msgid=objednavka-1234
Response (success)
{
"status": "OK",
"msgid": "objednavka-1234",
"delivery_status": "delivered",
"number": "421905123456",
"sent_at": "2026-06-07T14:30:00+02:00",
"delivered_at": "2026-06-07 14:32:10"
}
Response (not found)
{
"status": "ERR",
"msg": "Správa s daným msgid nebola nájdená."
}
Credit balance
Returns the current available credit on your account. The user parameter is the login email, pass is the account API key (account_akey, section 🔑 API Key in the portal).
{
"status": "OK",
"balance": 12.4500,
"currency":"EUR"
}
username (email) + password (account password) and returns an XML response:<response><status>1</status><balance>12.4500</balance>...</response>Send via SIM Hosting
Sends an SMS directly via your SIM card. The message must be without diacritics (automatically normalized). Requires an active SIM Hosting account.
The endpoint accepts JSON and form-data (application/x-www-form-urlencoded).
| Parameter | Type | Description | |
|---|---|---|---|
| user | string | required | Login email |
| pass | string | required | API key (sender akey of the SIM card) |
| to | string | required | Phone number in international format (+421...) |
| text | string | required | Message text. Diacritics will be automatically normalized. |
Example request
POST /api/sim/send.php Content-Type: application/json { "user": "vas@email.sk", "pass": "vas-api-kluc", "to": "+421905123456", "text": "Dobry den, vasa objednavka je pripravena." }
Response (success)
{
"status": "OK",
"idsms": 12345
}
Response (error)
{
"status": "ERR",
"msg": "Nedostatok kreditu. Zostatok: 0.0000 EUR"
}
Incoming SMS (SIM)
SMS received on your SIM card (server transmitter, self_hosted=0) cannot be retrieved by polling — the server immediately forwards each received SMS as a webhook to the callback URL configured on the SIM card (parameter curl, see the SIM Management API section). Technical details are in the Webhook section.
Webhook
The callback URL is set per SIM card via the curl parameter in the SIM Management API (/api/account/sim.php, see the SIM Management — update section). The server sends a GET request with query parameters to this URL for two event types, distinguished by the event parameter:
| event | When | Parameters |
|---|---|---|
| incoming | A new SMS arrived on your SIM card | id, from, sim, text, received_at |
| delivery | A sent SMS was delivered (or failed) | idsms, status (delivered / failed), number, gw_id |
Example — incoming SMS
GET https://vas-server.sk/callback?event=incoming&id=1042&from=%2B421905999888&sim=%2B421000000000&text=Ahoj%2C+aky+je+termin+dodania%3F&received_at=2026-06-07+09%3A14%3A22
Example — delivery status
GET https://vas-server.sk/callback?event=delivery&idsms=12345&status=delivered&number=%2B421905123456&gw_id=...
Bulk multi-sender (Reseller)
Sends bulk SMS via SIM Hosting where each message can have its own sender (SIM card). Intended for resellers who operate multiple SIM cards under one account. Authentication is via account API key (account_akey) — one key for the whole account, no need to switch between sender keys.
Content-Type header (application/json or application/xml). The response is returned in the same format. Maximum number of messages per request: 2,000.sender is verified against your own SIM accounts — it is not possible to send a message under a number that does not belong to you. Messages with an unknown sender are rejected individually (others are sent normally).Request parameters
| Parameter | Type | Description | |
|---|---|---|---|
| username | string | required | Client account login email |
| account_akey | string | required | Account API key (from the portal, API Key section) |
| messages | array | required | Array of messages, max 2,000. Each element contains recipient, message and optionally sender. |
Parameters of each message (messages[])
| Parameter | Type | Description | |
|---|---|---|---|
| recipient | string | required | Recipient phone number in international format (+421900123456) |
| message | string | required | SMS text. Diacritics will be automatically normalized. |
| sender | string | optional | Sender SIM card number (must belong to your account). If missing, the first/default SIM card is used. |
Example request
POST /api/account/bulk-send.php Content-Type: application/json { "username": "vas@email.sk", "account_akey": "vas-uctovy-api-kluc", "messages": [ { "recipient": "+421900111222", "sender": "421947932736", "message": "Dobry den, vasa objednavka je pripravena." }, { "recipient": "+421900333444", "sender": "421948700708", "message": "Upomienka: termin stretnutia zajtra o 10:00." }, { "recipient": "+421900555666", "message": "Tato sprava ide cez predvoleneho sendera." } ] }
POST /api/account/bulk-send.php Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <credential> <username>vas@email.sk</username> <account_akey>vas-uctovy-api-kluc</account_akey> </credential> <messages> <message> <recipient>+421900111222</recipient> <sender>421947932736</sender> <text>Dobry den, vasa objednavka je pripravena.</text> </message> <message> <recipient>+421900333444</recipient> <sender>421948700708</sender> <text>Upomienka: termin stretnutia zajtra o 10:00.</text> </message> </messages> </request>
Response (success)
{
"status": "OK",
"sent": 2,
"failed": 1,
"results": [
{ "recipient": "+421900111222", "sender": "421947932736", "status": "OK", "idsms": 12345 },
{ "recipient": "+421900333444", "sender": "421948700708", "status": "OK", "idsms": 12346 },
{ "recipient": "+421900555666", "sender": "421947932736", "status": "ERR", "msg": "Nedostatok kreditu" }
]
}
<?xml version="1.0" encoding="UTF-8"?> <response> <status>OK</status> <sent>2</sent> <failed>1</failed> <results> <result><recipient>+421900111222</recipient><sender>421947932736</sender><status>OK</status><idsms>12345</idsms></result> <result><recipient>+421900333444</recipient><sender>421948700708</sender><status>OK</status><idsms>12346</idsms></result> <result><recipient>+421900555666</recipient><sender>421947932736</sender><status>ERR</status><msg>Nedostatok kreditu</msg></result> </results> </response>
SIM Management API (Reseller)
Programmatic management of SIM accounts — create, list, update and delete. Designed for resellers who distribute SIM cards to their own clients and need to automate this process. No limit on the number of SIM accounts (the limit of 10 applies only to self-registration from the portal).
account_akey) as for bulk SMS sending. Find the key in the portal under the 🔑 API Key section.Content-Type header. The response is returned in the same format as the request.Action overview
| action | Description | Key parameters |
|---|---|---|
list | List all SIM accounts including akey | — |
create | Create one or more SIM accounts, returns akey | sims[] |
update | Change number, price, status or transmitter type | sim_id |
delete | Delete a SIM account | sim_id |
Common parameters for every request
| Parameter | Type | Description | |
|---|---|---|---|
| username | string | required | Client account login email |
| account_akey | string | required | Account API key (from the portal, API Key section) |
| action | string | required | list / create / update / delete |
SIM Management — list
Returns a list of all SIM accounts assigned to the account, including their akey (needed for Android app setup).
{
"username": "vas@email.sk",
"account_akey": "vas-uctovy-api-kluc",
"action": "list"
}
<?xml version="1.0" encoding="UTF-8"?> <request> <credential> <username>vas@email.sk</username> <account_akey>vas-uctovy-api-kluc</account_akey> </credential> <action>list</action> </request>
{
"status": "OK",
"count": 2,
"sims": [
{ "id": 41, "myphone": "421947932736", "sim_price": 0.008, "active": 1, "self_hosted": 1, "akey": "a1b2c3..." },
{ "id": 42, "myphone": "421948700708", "sim_price": 0.010, "active": 1, "self_hosted": 0, "akey": "d4e5f6..." }
]
}
SIM Management — create
Creates one or more SIM accounts at once. For each successfully created account, returns the generated akey — which must be entered into the Android app.
Parameters for each record in sims[]
| Parameter | Type | Description | |
|---|---|---|---|
| myphone | string | required | SIM card number — digits only, international format without + (e.g. 421900123456) |
| self_hosted | int | optional | 1 = Client transmitter — app on the client's phone (default); 0 = Server transmitter — SIM card on your server |
| sim_price | float | optional | Price per SMS in EUR. Default 0.008. |
| active | int | optional | 1 = active (default), 0 = inactive |
| contact_email | string | optional | Contact email for notifications. Default = account email. |
| curl | string | optional | Webhook URL for server transmitter (self_hosted=0) — incoming SMS and delivery status, see the Webhook section. |
{
"username": "vas@email.sk",
"account_akey": "vas-uctovy-api-kluc",
"action": "create",
"sims": [
{
"myphone": "421900111222",
"self_hosted": 1,
"sim_price": 0.008
},
{
"myphone": "421900333444",
"self_hosted": 0,
"sim_price": 0.010,
"contact_email": "klient@example.sk",
"curl": "https://vas-server.sk/callback"
}
]
}
<?xml version="1.0" encoding="UTF-8"?> <request> <credential> <username>vas@email.sk</username> <account_akey>vas-uctovy-api-kluc</account_akey> </credential> <action>create</action> <sims> <sim> <myphone>421900111222</myphone> <self_hosted>1</self_hosted> <sim_price>0.008</sim_price> </sim> <sim> <myphone>421900333444</myphone> <self_hosted>0</self_hosted> <sim_price>0.010</sim_price> <curl>https://vas-server.sk/callback</curl> </sim> </sims> </request>
{
"status": "OK",
"created": 2,
"failed": 0,
"results": [
{ "myphone": "421900111222", "status": "OK", "id": 42, "akey": "a1b2c3d4...", "self_hosted": 1, "sim_price": 0.008, "active": 1 },
{ "myphone": "421900333444", "status": "OK", "id": 43, "akey": "e5f6g7h8...", "self_hosted": 0, "sim_price": 0.010, "active": 1 }
]
}
SIM Management — update
Updates the details of an existing SIM account. Only send the fields you want to change — others remain unchanged.
| Parameter | Type | Description | |
|---|---|---|---|
| sim_id | int | required | SIM account ID (from list or create) |
| myphone | string | optional | New SIM card number |
| sim_price | float | optional | New price per SMS |
| active | int | optional | 1 = activate, 0 = deactivate |
| self_hosted | int | optional | 0 = Server, 1 = Client |
| curl | string | optional | New callback URL |
| contact_email | string | optional | New contact email |
{
"username": "vas@email.sk",
"account_akey": "vas-uctovy-api-kluc",
"action": "update",
"sim_id": 42,
"active": 0,
"sim_price": 0.012
}
<?xml version="1.0" encoding="UTF-8"?> <request> <credential> <username>vas@email.sk</username> <account_akey>vas-uctovy-api-kluc</account_akey> </credential> <action>update</action> <sim_id>42</sim_id> <active>0</active> <sim_price>0.012</sim_price> </request>
{
"status": "OK",
"id": 42,
"myphone": "421900111222",
"sim_price": 0.012,
"active": 0,
"self_hosted": 1
}
SIM Management — delete
Permanently deletes a SIM account. This action is irreversible.
akey will stop working. All SMS in the send queue for this account will also be deleted.| Parameter | Type | Description | |
|---|---|---|---|
| sim_id | int | required | SIM account ID to delete |
{
"username": "vas@email.sk",
"account_akey": "vas-uctovy-api-kluc",
"action": "delete",
"sim_id": 42
}
<?xml version="1.0" encoding="UTF-8"?> <request> <credential> <username>vas@email.sk</username> <account_akey>vas-uctovy-api-kluc</account_akey> </credential> <action>delete</action> <sim_id>42</sim_id> </request>
{
"status": "OK",
"deleted_id": 42,
"myphone": "421900111222"
}
Example: PHP
SMS Gateway — single SMS
<?php $ch = curl_init('https://infosms.online/api/bulk/'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode([ 'user' => 'vas@email.sk', 'pass' => 'vas-api-kluc', 'numbers' => ['+421905123456'], 'text' => 'Vasa objednavka je pripravena.', 'from' => 'MojaFirma', ]), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], ]); $result = json_decode(curl_exec($ch), true); curl_close($ch); echo $result['status'] === 'OK' ? "Odoslaných: {$result['sent']}" : $result['msg'];
Reseller — SIM Management (create + list)
<?php function simApi($action, $payload) { $ch = curl_init('https://infosms.online/api/account/sim.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode(array_merge([ 'username' => 'vas@email.sk', 'account_akey' => 'vas-uctovy-api-kluc', 'action' => $action, ], $payload)), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], ]); $r = json_decode(curl_exec($ch), true); curl_close($ch); return $r; } // Vytvorenie dvoch SIM kont $res = simApi('create', [ 'sims' => [ ['myphone' => '421900111222', 'self_hosted' => 1], ['myphone' => '421900333444', 'self_hosted' => 1], ] ]); foreach ($res['results'] as $s) { echo "{$s['myphone']} — akey: {$s['akey']}\n"; } // Zoznam všetkých SIM kont $list = simApi('list', []); foreach ($list['sims'] as $s) { echo "{$s['myphone']} — active: {$s['active']}\n"; }
Reseller — bulk multi-sender via SIM Hosting
<?php $ch = curl_init('https://infosms.online/api/account/bulk-send.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode([ 'username' => 'vas@email.sk', 'account_akey' => 'vas-uctovy-api-kluc', 'messages' => [ ['recipient' => '+421900111222', 'sender' => '421947932736', 'message' => 'Text pre prveho.'], ['recipient' => '+421900333444', 'sender' => '421948700708', 'message' => 'Text pre druheho.'], ], ]), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], ]); $result = json_decode(curl_exec($ch), true); curl_close($ch); echo "Odoslaných: {$result['sent']}, chýb: {$result['failed']}";
Example: Python
import requests # Odoslanie SMS cez InfoSMS.online API url = 'https://infosms.online/api/bulk/' data = { 'user': 'vas@email.sk', 'pass': 'vas-api-kluc', 'numbers': ['+421905123456'], 'text': 'Vaša objednávka je pripravená.', 'from': 'MojaFirma', } response = requests.post(url, json=data) result = response.json() if result['status'] == 'OK': print(f"Odoslaných: {result['sent']}, zostatok: {result['credit']}") else: print(f"Chyba: {result['msg']}")
Example: cURL
# Odoslanie SMS (SMS Brána) curl -X POST https://infosms.online/api/bulk/ \ -H "Content-Type: application/json" \ -d '{"user":"vas@email.sk","pass":"vas-api-kluc","numbers":["+421905123456"],"text":"Test SMS","from":"MojaFirma"}' # Reseller — hromadné multi-sender (JSON) curl -X POST https://infosms.online/api/account/bulk-send.php \ -H "Content-Type: application/json" \ -d '{ "username": "vas@email.sk", "account_akey": "vas-uctovy-api-kluc", "messages": [ {"recipient":"+421900111222","sender":"421947932736","message":"Text 1"}, {"recipient":"+421900333444","sender":"421948700708","message":"Text 2"} ] }' # Reseller — hromadné multi-sender (XML) curl -X POST https://infosms.online/api/account/bulk-send.php \ -H "Content-Type: application/xml" \ -d '<?xml version="1.0"?><request><credential><username>vas@email.sk</username><account_akey>vas-uctovy-api-kluc</account_akey></credential><messages><message><recipient>+421900111222</recipient><sender>421947932736</sender><text>Text 1</text></message></messages></request>' # Zostatok kreditu curl "https://infosms.online/api/balance/?user=vas@email.sk&pass=vas-api-kluc"
Example: Node.js
// Odoslanie SMS cez InfoSMS.online API // npm install node-fetch import fetch from 'node-fetch'; const url = 'https://infosms.online/api/bulk/'; const data = { user: 'vas@email.sk', pass: 'vas-api-kluc', numbers: ['+421905123456'], text: 'Vaša objednávka je pripravená.', from: 'MojaFirma', }; const res = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data), }); const result = await res.json(); if (result.status === 'OK') { console.log(`Odoslaných: ${result.sent}, zostatok: ${result.credit}`); } else { console.error(`Chyba: ${result.msg}`); }