API GENERAL OVERVIEW
API - based on HTTP protocol. Communication implemented on client–server basis.
The platform accepts GET/POST requests. It returns GET request with DLR (message status).
GET requests from the user must be URL encoded.
SECURITY AND CONFIDENTIALITY
- The platform uses HTTPS protocol
- There is an IP restriction for every user.
- When passing each request, username and password are validated.
- Option for a VPN connection.
In case some of the above-mentioned verifications are not passed successfully – request for SMS will be denied and the client notified. In case of a malicious attack, IP of the sender will be blocked.
SMS (HTTP)
- Please contact Mobica support (support@mobica.bg) in order to receive username and password. They will be your identifier when sending a short text message.
- Your account starts with a small amount of money for testing. After money’s depletion, it is necessary to top-up your account in order to use the service.
- You must configure IP addresses that you will be sending requests from.
Parameter | Description | Obligatory |
---|---|---|
user | Your username | yes |
pass | Your pasword | yes |
phone | Receiver’s number must contain country code (for example: 359 888888888). One request can contain more than one mobile phone number using a comma (,) to separate the numbers. | yes |
message | Message text. The length of the text with Latin symbols is up to 160 characters. When the text is in Cyrillic (Unicode), the limit is up to 67 characters. If the symbols exceed this number,they are paid with an additional short text message. | yes |
from | Message sender (Sender ID). There is a limit up to 11 symbols, if your route allows an alpha sender. If not provided, a default will be used. Your client is set by an administrator. | no |
route | Number of package.The message will be sent from (integer). If you have more than one package. If not provided, it will go via the package that is configured by default. | no |
idd | Unique identification number of your short text message. It serves to receive a dynamic status (string). | NO(YES for DLR) |
smartCut | When text length exceeds one short text message, the network processes it as two or more text messages Smart cut attempts not to cut words in the text. Activation occurs with random monetary value. | no |
priority | INT default value (0) - default priority ,The hightest priority is 255. | no |
toDate | Future date format (YYYY-mm-dd h:min) on which the SMS will be delivered. If not provided, SMS is instant. | no |
# | Description | Status |
---|---|---|
1 | Successfully accepted request | 1004 |
2 | Invalid Phone Number | 1006 |
3 | Invalid schedule data | 1007 |
4 | Invalid Request Format | 1008 |
5 | Invalid username or password | 1115 |
6 | Money in your account have ran out | 1117 |
7 | No value for obligatory field is set | 1120 |
8 | Request sent from unauthorized IP address | 1121 |
9 | Account is not active | 1122 |
# | Description | Code |
---|---|---|
1 | No value for obligatory field is set | 0x000000C3 |
2 | Request sent from unauthorized IP address: | 0x00000100 |
3 | Money in your account have ran out | 0x00000100 |
4 | Successfully accepted request: | 0x000000FF |
# | Description | Code |
---|---|---|
1 | Successfully delivered | 0x02 |
2 | Rejected | 0x08 |
3 | The message is waiting to be sent. | 0x01 |
4 | The message is not delivered and 24 hours have passed since its sending. | 0x03 |
5 | The message is not sent to the end user. | 0x05 |
6 | The message status is unknown. | 0x07 |
VIBER
Parameter | Description | Obligatory |
---|---|---|
user | Your username | yes |
pass | Your pasword | yes |
phones | (array of object) The list of phone numbers. With one message request the customer can send up to 1000 phone numbers | yes |
viber | (object) Parameters text, buttonCaption + buttonAction and image make Viber
Service Message content. There are 4 possible combinations of Viber Service
Message content:
|
yes |
viber.tag | Free text, reports can be generated based on tags. (e.g. "campaign_name") Tags are used in analytics GUI to filter out specific traffic based on tag. | no |
viber.text | The Viber Service Message text. Text length can be up to 1000 characters. VIBER text can be sent alone, without button or image | no |
viber. expiry_text | Relevant for iOS version of Viber application (iPhone users only).This is the text that will be displayed if Viber Service Message expires. If not provided, it will automatically be filled with default text. | no |
viber.validity_period_sec | TTL value in seconds (range - 15 to 86400). If the Viber Service message can’t be delivered within given seconds, we will send an SMS message as a fallback. | no |
viber. button_text | A textual writing on the button. Maximum length is 20 characters.The VIBER button can be sent only if Viber Service Message contains text | no |
viber. button_url | The link of button action. | no |
viber. image_url | The URL address of image sent to end user. The VIBER image can be sent alone or together with text and button. | no |
viber. is_promotional | Indicates if content is of promotional character | no |
viber.sms_text | This text will be received via SMS if Viber message is not delivered. | no |
viber.idd | Unique identification number of your Viber message. It serves to receive a dynamic status (string). | no
(YES for DLR)
|
# | Description | STATUS |
---|---|---|
1 | Message accepted | 1004 |
2 | This messenger can not support image | 1012 |
3 | This messenger can not support button | 1013 |
4 | This messenger can not support button | 1018 |
5 | User not active | 1105 |
6 | Inactive user | 1106 |
7 | You don't have HLR permission | 1107 |
8 | Invalid username or password | 1115 |
9 | No money | 1117 |
10 | Flood | 1118 |
11 | IP not allowed | 1121 |
# | Description | STATUS |
---|---|---|
1 | Waiting for transmit | 1003 |
2 | Successfully accepted request | 1004 |
3 | Rejected | 1005 |
4 | Invalid Phone Number | 1006 |
5 | Invalid Request Format | 1008 |
6 | Messenger text is empty | 1010 |
7 | Messenger text must be under 1000 and over 3 symbols | 1011 |
8 | Button text length is large | 1014 |
9 | SMS text must be under 160 and over 3 symbols | 1015 |
10 | Invalid image source | 1016 |
11 | Button url is invalid | 1017 |
12 | Flood | 1018 |
13 | Cannot support button without text | 1019 |
14 | SMS text is required | 1020 |
15 | Invalid username or password | 1115 |
16 | Money in your account have ran out | 1117 |
17 | Messenger not allowed | 1119 |
18 | No value for obligatory field is set | 1120 |
19 | Request sent from unauthorized IP address | 1121 |
20 | Account is not active | 1122 |
21 | Phone number is in blacklist | 1209 |
HLR (NUMBER LOOKUP)
Parameter | Description | Obligatory |
---|---|---|
user | Your username | yes |
pass | Your pasword | yes |
number | Receiver’s number must contain country code (for example: 359 888888888). One request can contain more than one mobile phone number using a comma (,) to separate the numbers. | yes |
URL | A valid URL address must be indicated, that will be used for accepting the requests' statuses. Example: http(s)://www.yourdomain.com/callback | no |
reference | Unique identification number of your HLR. It serves to receive a dynamic status (integer). | no |
Number of package through which the message will be sent (integer). | no |
# | Description | Status |
---|---|---|
1 | Successfully accepted request | 1004 |
2 | No value for obligatory field is set | 1120 |
3 | Request sent from an unauthorized IP address | 1121 |
4 | Account is not active | 1122 |
5 | Invalid username or password | 1115 |
6 | Money in your account have ran out | 1117 |
7 | Invalid Phone Number | 1006 |
Parameter | Description | Obligatory |
---|---|---|
NUMBER | Requested number in the HLR request | yes |
REFERENCE | Reference parameter from the sent request for HLR | yes |
STATUS | One of the statuses in Table 9 | yes |
REASON | When the status is not „Delivered“, the reason will be specified (Table 12). | yes |
TIMESTAMP | Indication of the time when the server operator has received the request. The format isYYYYMMDDHHMMSS. Example: 20120501083055 | yes |
IMSI | IMSI of the number. | no |
NETWORKCODE | Operator’s network code. The Network code contains MCC (the country code is the first three digits) and MNC (code of the operator is the last 2 digits). Example: 20404 | no |
OPERATOR | Country and operator. Example: (BULGARIA)GLOBUL | no |
COUNTRYCODE | Literal index of the operator's country. Example: bg | no |
MSC | MSC (Commutation center) to which the number is registered at the time of the verification. It starts with the country's code and operator’s code, where the subscriber's latest registration is. If it is roaming, the first digits show where he/she is located (country and mobile operator are identified). | no |
# | Description | RESPONSE |
---|---|---|
1 | The number is valid. | 1000 |
2 | The number is invalid. | 1205 |
3 | The request is rejected. | 1207 |
4 | The time of the request has run out. | 1204 |
5 | Unknown status. | 1206 |
Description | RESPONSE |
---|---|
Absent subscriber (network cannot contact subscriber) | 1 |
Handset memory exceeded | 2 |
Equipment protocol error | 3 |
Equipment not equipped with short-message capability | 4 |
Unknown service centre (destination MSC) | 5 |
Service centre congestion (Too much inbound traffic at the destination network) | 6 |
Invalid SME address | 7 |
Subscriber is not a SC subscriber (Number belongs to a different destination network, but HLR is not updated) | 8 |
Unknown subscriber (IMSI is unknown in the HLR) | 9 |
Illegal subscriber (The mobile station failed authentication) | 10 |
Teleservice not provisioned (Mobile subscription identified by the MSISDN number does not include the short message service. Might happen, because the number/subscriber has been blocked) | 11 |
Illegal equipment (IMEI check failed, blacklisted or not whitelisted) | 12 |
Call barred (Operator barred the MSISDN number) | 13 |
Facility not supported (VLR in the PLMN does not support MT short message service) | 14 |
Subscriber busy for MT short messages | 15 |
System failure | 16 |
Message waiting list at HLR is full | 17 |
Data missing | 18 |
Unexpected data value | 19 |
Resource limitation at peer / destination network | 20 |
TCAP error (Duplicate invoke ID) | 21 |
TCAP error (Service not supported) | 22 |
TCAP error (Mistyped parameter) | 23 |
TCP error (Resource Limit) | 24 |
TCAP error (TCAP initiating release) | 25 |
TCAP error (Unexpected response from peer) | 26 |
TCAP error (Service completion failure) | 27 |
TCAP error (No response from peer. No response from the end user, might be because user is out of coverage, or there is some issue with his/her phone) | 28 |
TCAP error (Invalid response received) | 29 |
Unidentified subscriber. Unable to indentify the subscriber. Might be due to invalid number | 30 |
Service temporary not available | 31 |
Illegal error code | 32 |
Network timeout | 33 |
Operation Barred (From the MNO) | 34 |
Delivery failure | 35 |
cError in MSHLR | 36 |
PLMN system failure | 37 |
HLR system failure | 38 |
VLR system failure | 39 |
Controlling MSC failure (Error in the MSC where the user is located) | 40 |
Visited MSC failure (Error in the visited MSC) | 41 |
MNP other operator not allowed (MSISDN is ported, delivery via this SMSC is not permitted) | 42 |
Subscriber temporarily unreachable (While roaming) | 43 |
Message store busy | 44 |
SME Interface busy | 45 |
Closed user group rejection | 46 |
Network failure | 47 |
Deferred Delivery (Message has not been delivered and is part of a deferred delivery schedule) | 48 |
Error getting route | 49 |
Rejected Destination | 51 |
Rejected - Unknown Reason | 52 |
Rejected due to a routing issue | 53 |
Rejected due to a blocking issue | 54 |
Rejected - no price | 55 |
Rejected - not enough credit | 56 |
Rejected due to spam filter | 57 |
Rejected due to flooding | 58 |
UNKNOWN TCType,SMS | 59 |
UNKNOWN TCType,SRI | 60 |
UNKNOWN | 61 |
Failure due to submission towards AA19 destination | 62 |
Sent to SME, but unable to confirm | 63 |
Replaced at the SMSC | 64 |
Quality service not available | 65 |
Error in SMSC | 66 |
Rejected by operator due to validity period expiration | 67 |
Intermediate state notification; message has not been delivered yet, due to a phone-related problem, but is being retried | 68 |
Cannot determine whether this message has been delivered, or it has failed, due to a lack of final delivery state information from the operator. | 69 |
Specific content is not permitted on the network / shortcode | 70 |
Subscriber cannot receive adult content because of a parental lock | 71 |
Failure due to ported combinations being unreachable. | 72 |
Roaming subscriber. | 73 |
Failure due to ported combinations being blocked for client (Client has been blacklisted from the ported destination). | 74 |
Abort from HLR | 75 |
Source address is blacklisted or not supported | 76 |
Operation barred | 77 |
Facility not provided | 78 |
Invalid absolute validity period | 79 |
SMS center received | 80 |
Invalid PDU format | 81 |
Local Cancel (Temporary problem / Lost reach) | 82 |
Rejected due to duplication | 83 |
Maximum connection reached | 84 |
Information not available | 85 |
Message waiting list is full | 86 |
Short term denial | 87 |
Message replaced by SMSC | 89 |
Congestion at subscriber | 90 |
Service rejected | 91 |
Error in SME | 92 |
Remote procedure error | 93 |
Connection rejected by SME | 94 |
SM deleted by sender | 95 |
SM deleted by SMSC Admin | 96 |
Absent subscriber IMSI detached | 97 |
SMS malformed | 98 |
DCS inconsistency | 99 |
Maximum submission attempt reached | 100 |
Maximum time to live for message reached | 101 |
No response from SME | 102 |
Maximum submission attempt reached (finalised before validity period expiration) | 103 |
Max TTL for message reached (finalised when validity period expired) | 104 |
Portability error | 105 |
Canceled at SMSC | 106 |
Parameter | Description | Obligatory |
---|---|---|
idd | Identification number of your VAS SMS request. Corresponds to parameter “idd“in your SMS request. | yes |
sh_number | Short number that the message is sent to. | yes |
message | Message text. | yes |
phone | GSM number that sent the message. | yes |
operator | Operator name. | yes |
date | Date and time of the message. (yyyy-mm-dd hh:mm:ss) | yes |
If your answer to us contains ":" (two point separator) we will automatically send the text after the first two points to the phone number of the request.
After the first two points the text must be at least 3 characters.
Parameter | Description | Obligatory |
---|---|---|
id | Identification number of your SMS request. Corresponds to parameter “idd“in your SMS request. | yes |
phone | GSM number that the message is sent to. | yes |
chanel | The service used to send the message (sms, viber, telegram) | yes |
status | Service status. | yes |
desc | Description for sms status | yes |
reason | Service only for Viber:[ Delivered, Seen, Expired, TTL Expired, Unable To Submit, SRVC_NOT_PERMITTED, SRVC_NOT_VIBER_USER, SRVC_NO_SUITABLE_DEVICE, SRVC_USER_BLOCKED, SRVC_TIMEOUT, FROM_NOT_ALLOWED, SPAM_DETECTED, BAD_WORDS_FOUND, PHONE_BLACKLISTED, PHONE_INCORRECT, INVALID_SESSION, VIBER_UNKNOWN_ERROR ] |
no |
reply_text | Two-way answer | no |
reply_date | Two-way date | no |
date | Date and time of the message. (yyyy-mm-dd hh:mm:ss) | yes |
# | Description | Code |
---|---|---|
1 | Message successfully delivered. | 1000 |
2 | Operator you are sending request to is not authorized. | 1113 |
3 | There is a missed word in the message. | 1116 |
4 | No money. | 1117 |
5 | You are repeating a message sent within the last 10 minutes. | 1118 |
6 | Message pending | 1203 |
7 | Message expired (after 24 hours pending) | 1204 |
8 | Message not sent to the end user. | 1205 |
9 | Message status is unknown. | 1206 |
10 | Partially undelivered long message. | 1210 |
DLR (REQUEST STATUS)
Seek DLR status within 24 hours of today.
PARAMETER | Description | OBLIGATORY |
---|---|---|
user | Your username | YES |
pass | Your pasword | YES |
idd | Unique identification number of your short text message. It serves to receive a dynamic daily status (string). | NO (YES for DLR) |
USER (CHECK MONEY) Money are checked and updated in your account every 10 min
PARAMETER | Description | OBLIGATORY |
---|---|---|
user | Your username | YES |
pass | Your password | YES |