To connect directly to our database, you must check the "SQL" option in the "Connection Methods" field in the gateway settings section.
Our database operates under the MySQL 5 DBMS. To enable direct connection to our database, you need to check the "SQL" option in the "Connection Methods" field in the gateway settings section. After this, an account will be created with the login and password you specified for connecting to the gateway, along with a table for storing your data in the database "users."
Once set up, you can connect to the database and work with it using any method available to you. The database server is located at sql.turbosms.ua, the working database is "users," and your table name matches the login for connecting to the gateway 1.
The created account has limited access. You can only write values to specific fields and delete records. You cannot modify the field values or table structure. New records are checked every second. All processed records become available for viewing in the TurboSMS web interface.
The table encoding is utf8, so Cyrillic text messages must be in UTF-8 encoding. To correctly insert Russian text and read status texts, execute the query SET NAMES utf8; after connecting to the server. To use our database in other DBMS, install the MySQL ODBC 5.1 or MySQL ODBC 3.xx driver. Note that version 5.1 may cause permission issues, so we recommend using version 3.xx.
By default, the Ukrainian time zone is applied when connecting (UTC+2, UTC+3 during daylight saving time). To shift the time zone, use a query like SET timezone = '+00:00';, where +00:00 is the time zone offset.
To ensure stable service operation and fast query execution, we delete records older than 180 days (six months). If no records are added during this period through the configured connection, it will also be deleted. You can create a new connection anytime in your user account.
All messages are immediately added to the TurboSMS database upon insertion. Subsequent content changes to SMS are not synchronized. If you need to change processed messages, you must delete them first and then reinsert them with updated data.
Field | Type | Access | Purpose |
---|---|---|---|
id | integer | Read | Auto-increment field storing the message ID for quick search |
msg_id 2 | string (36) | Read | Message ID in the system. This ID allows you to check the delivery status |
number | string (21) | Full | Recipient's phone number in international format, digits only |
sign | string (11) | Full | Alphanumeric name (sender's signature) |
message | string (1530) | Full | Message text |
wappush 3 | string (128) | Full | WapPush link, including http:// |
is_flash 3 | bool | Full | Flash message flag (1 - yes, 0 - no) |
cost 2 | decimal(4,2) | Read | Message cost in hryvnias |
balance 2 | decimal(10,2) | Read | User account balance after processing |
added 2 | timestamp 4 | Read | Record addition date and time |
send_time | timestamp 4 | Full | Scheduled message sending date and time |
sended 2 | timestamp 4 | Read | Actual message sending date and time |
received 2 | timestamp 4 | Read | Status update date and time |
error_code 2 | string (3) | Read | Error code during processing |
|
string | Read | Delivery status as per SMPP v3.4 protocol specification |
1 Note: Changing the gateway connection login changes the account and table name, so be careful.
2 Field data is filled by our server during message processing. If the field values are NULL, processing has not been completed yet.
3 Some phone models do not support WapPush or flash messages.
4 Date format for all date and time fields: YYYY-MM-DD HH:MM, considering the configured connection time zone.
status | Description |
---|---|
NULL | The message has not been processed yet |
ACCEPTD | The message has been accepted for processing |
ENROUTE | The message has been sent to the mobile network |
DELIVRD | The message has been delivered to the recipient |
EXPIRED | The message has expired |
DELETED | Deleted by the operator |
UNDELIV | Not delivered |
REJECTD | The message was rejected |
UNKNOWN | Unknown status |
error_code | Description |
---|---|
0 | No errors |
2 | Failed to save data. Contact support if the error persists. |
23 | Errors in the recipient's number |
34 | Recipient's country is not supported; additional activation is required |
36 | Failed to send the message. Contact support if the error persists. |
40 | Insufficient funds on the balance |
46 | The recipient's number is in the stop list |
69 | The sender's signature is prohibited by the administrator |
83 | Duplicate message |
84 | Message text is missing |
85 | Incorrect sender's signature |
86 | The message text contains prohibited words |
87 | The message text is too long |
88 | Your account is blocked for violations. Contact support. |
999 | Operator-specific error; further clarification is required |
This list includes the most common error codes. If a code is not listed, please contact support.