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

  1. The platform uses HTTPS protocol
  2. There is an IP restriction for every user.
  3. When passing each request, username and password are validated.
  4. 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)

  1. 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.
  2. 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.
  3. You must configure IP addresses that you will be sending requests from.

PARAMETERS

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
Table 1

RESPONSE CODES

# 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
Table 2

JSON POST REQUEST

REQUEST URL

https://gate.mobica.bg/send.php

REQUIRED HEADERS

Accept: application/json

Content-Type: application/json

single message

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ " Your phone here! " ], "sms":{ "message":" Your message here! ", "from":" Your sender here! ", "idd":" Your DLR ID here! ", "route":" Your route here! ", "priority":" 0 ", "smartCut":" 1 ", "toDate":" 2020-02-02 02:02 " } }

MULTIPLE MESSAGE

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ { "idd":" Your idd 1 here! ", "phone":" Your phone here! " }, { "idd":" Your idd 2 here! ", "phone":" Your phone here! " } ], "sms":{ "message":" Your message here! ", "from":" Your sender here! ", "route":" Your route here! ", "priority":" 0 ", "smartCut":" 1 ", "toDate":" 2020-02-02 02:02 " } }

RESPONSE

{
 "status": "1004" ,
 "desc": "message accepted" ,
}

EXAMPLE PHP

<?php /** * @param $url * @param $request * @return mixed */ function send($url, $request) { $ch = curl_init(); $headers = [ 'Accept: application/json', 'Content-Type: application/json', ]; $options = [ CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $request, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, CURLOPT_HTTPHEADER => $headers, ]; curl_setopt_array($ch, $options); $response = curl_exec($ch); curl_close($ch); return $response; } //API URL. $apiUrl = 'https://gate.mobica.bg/send.php'; $phone = [ [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], ]; $sms = [ 'message' => ' Your text here! ', 'from' => '', 'route' => '', 'idd' => '', 'smartCut' => '', 'priority' => '', 'toDate' => '', ]; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'phone' => $phone, 'sms' => $sms ]; echo send($apiUrl, json_encode($data));

GET REQUEST

REQUEST URL – SINGLE MESSAGE

https://gate.mobica.bg/send.php?user=<'your user name'>&pass=<'your password'>&phone=359888888888&message=test%20message&from=test&route=<'my route'>

REQUEST URL – MULTIPLE MESSAGE

https://gate.mobica.bg/send.php?user=<'your user name'>&pass=<'your password'>&phone=359888888888,359888888889,359888888887,359888888886&message=test%20message&from=test&route=<'my route'>

RESPONSE

1004 //if all is OK

EXAMPLE PHP

<?php /** * @param $url * @param array $request * @return bool|string */ function send($url, Array $request) { $urlFull = $url.'?'.http_build_query($request); return file_get_contents($urlFull); } //API URL. $apiUrl = 'https://gate.mobica.bg/send.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'message' => ' Your text here! ', 'phone' => ' Your phone here! ', 'from' => '', 'route' => '', 'idd' => '', 'smartCut' => '', 'priority' => '', 'toDate' => '', ]; echo send($apiUrl, $data);

POST REQUEST

REQUEST URL

https://gate.mobica.bg/send.php

RESPONSE

1004 //if all is OK

EXAMPLE PHP

<?php /** * @param $url * @param array $request * @return mixed */ function send($url, Array $request) { $ch = curl_init(); $options = [ CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($request), CURLOPT_RETURNTRANSFER => true, ]; curl_setopt_array($ch, $options); $response = curl_exec($ch); curl_close($ch); return $response; } //API URL. $apiUrl = 'https://gate.mobica.bg/send.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'message' => ' Your text here! ', 'phone' => ' Your phone here! ', 'from' => '', 'route' => '', 'idd' => '', 'smartCut' => '', 'priority' => '', 'toDate' => '', ]; echo send($apiUrl, $data);

SMS (SMPP)

  1. 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.
  2. 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.
  3. You must configure IP addresses that you will be sending requests from.

OUR SMPP SERVER SETTINGS

IP: 85.217.170.42

Port: 8056

RESPONSE

# 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
Table 3

SMPP DLR STATUS REQUEST

# 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
Table 4

VIBER

  1. 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.
  2. 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.
  3. You must configure IP addresses that you will be sending requests from.
  4. If you wish to have a sender id, please contact our support: support@mobica.bg
    Note: To be eligible you need to have at least 200,000 messages sent per month, of which 60,000 to be delivered. If this minimum is not reached, you can still have your channel by paying minimum monthly fee 300 EUR
    Viber safe its right to cancel the channel.

JSON POST REQUEST

REQUEST URL

https://gate.mobica.bg/send.php

REQUIRED HEADERS

Accept: application/json

Content-Type: application/json

REQUEST PARAMETERS

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:
  • text only
  • image only
  • text + button
  • text + button + image
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)
Table 5

EASY INTEGRATION

SINGLE MESSAGE

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ " Your phone here! " ], "viber":{ "text":" Your text here! ", "image_url":" Your valid image url here! ", "button_url":" https://mobica.bg ", "button_text":" Please click here! ", "idd":" Your DLR ID here! ", "is_promotional":" 0 ", "validity_period_sec":" 600 ", "sms_text":" Your sms text here! " } }

MULTIPLE MESSAGE

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ { "idd":" Your idd 1 here! ", "phone":" Your phone here! " }, { "idd":" Your idd 2 here! ", "phone":" Your phone here! " } ], "viber":{ "text":" Your text here! ", "image_url":" Your valid image url here! ", "button_url":" https://mobica.bg ", "button_text":" Please click here! ", "is_promotional":" 0 ", "validity_period_sec":" 600 ", "sms_text":" Your sms text here! " } }

RESPONSE

{
 "status": "1004" ,
 "desc": "message accepted" ,
}

RESPONSE CODES

# 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
Table 6

STATUS IN CALLBACK URL REQUEST

# 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
Table 7

EXAMPLE PHP

<?php /** * @param $url * @param $request * @return mixed */ function send($url, $request) { $ch = curl_init(); $headers = [ 'Accept: application/json', 'Content-Type: application/json', ]; $options = [ CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $request, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, CURLOPT_HTTPHEADER => $headers, ]; curl_setopt_array($ch, $options); $response = curl_exec($ch); curl_close($ch); return $response; } //API URL. $apiUrl = 'https://gate.mobica.bg/send.php'; $phone = [ [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], ]; $viber = [ 'text' => ' Your text here! ', 'image_url' => '', 'button_url' => '', 'button_text' => '', 'idd' => '', 'is_promotional' => '', 'validity_period_sec' => '', 'sms_text' => '', ]; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'phone' => $phone, 'viber' => $viber ]; echo send($apiUrl, json_encode($data));

FULL INTEGRATION (WITH SMS API)

SINGLE MESSAGE

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ " Your phone here! " ], "viber":{ "text":" Your text here! ", "image_url":" Your valid image url here! ", "button_url":" https://mobica.bg ", "button_text":" Please click here! ", "idd":" Your DLR ID here! ", "is_promotional":" 0 ", "validity_period_sec":" 600 ", "sms_text":" Your sms text here! " }, "sms":{ "message":" Your message here! ", "from":" Your sender here! ", "idd":" Your DLR ID here! ", "route":" Your route here! ", "priority":" 0 ", "smartCut":" 1 ", "toDate":" 2020-02-02 02:02 " } }

MULTIPLE MESSAGE

{ "user":" Your username here! ", "pass":" Your password here! ", "phone":[ { "idd":" Your idd 1 here! ", "phone":" Your phone here! " }, { "idd":" Your idd 2 here! ", "phone":" Your phone here! " } ], "viber":{ "text":" Your text here! ", "image_url":" Your valid image url here! ", "button_url":" https://mobica.bg ", "button_text":" Please click here! ", "is_promotional":" 0 ", "validity_period_sec":" 600 ", "sms_text":" Your sms text here! " }, "sms":{ "message":" Your message here! ", "from":" Your sender here! ", "route":" Your route here! ", "priority":" 0 ", "smartCut":" 1 ", "toDate":" 2020-02-02 02:02 " } }

EXAMPLE PHP

<?php /** * @param $url * @param $request * @return mixed */ function send($url, $request) { $ch = curl_init(); $headers = [ 'Accept: application/json', 'Content-Type: application/json', ]; $options = [ CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $request, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, CURLOPT_HTTPHEADER => $headers, ]; curl_setopt_array($ch, $options); $response = curl_exec($ch); curl_close($ch); return $response; } //API URL. $apiUrl = 'https://gate.mobica.bg/send.php'; $phone = [ [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], [ 'idd' => ' Your unique identification! ', 'phone' => ' Your phone here! ', ], ]; $viber = [ 'text' => ' Your text here! ', 'image_url' => '', 'button_url' => '', 'button_text' => '', 'idd' => '', 'is_promotional' => '', 'validity_period_sec' => '', 'sms_text' => '', ]; $sms = [ 'message' => ' Your text here! ', 'from' => '', 'route' => '', 'idd' => '', 'smartCut' => '', 'priority' => '', 'toDate' => '', ]; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'phone' => $phone, 'viber' => $viber, 'sms' => $sms ]; echo send($apiUrl, json_encode($data));

HLR (NUMBER LOOKUP)

HLR (Home Location Register) is an online service that provides information about home country and network of a mobile subscriber, validity verification, current location, ported number identification.

  1. Please contact Mobica support (support@mobica.bg) for username and password. They will be your identifier when sending HLR.
  2. Your account will be loaded with a small amount of money for testing. After its depletion, it is necessary to topup your account, in order to use the service.
  3. You must configure IP addresses that you will be sending requests from.
  4. The GET request must have the following format:

    https://gate.mobica.bg/numberlookup.php?user=<'your user name'>&pass=<'your password'>&number=359888888888&reference=12121&url=<'url get hlr request'>

    OR

    https://gate.mobica.bg/numberlookup.php?user=<'your user name'>&pass=<'your password'>&number=359888888888&reference=12121&email=<'your email'>

REQUEST PARAMETERS

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
email Number of package through which the message will be sent (integer). no
Table 8

RESPONSE CODES

# 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
Table 9

STATUS IN CALLBACK URL REQUEST

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
Table 10

STATUS IN CALLBACK URL REQUEST

# 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
Table 11

REASON STATUS TABLE

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
Table 12

EXAMPLE PHP

GET REQUEST

<?php /** * @param $url * @param array $request * @return bool|string */ function send($url, Array $request) { $urlFull = $url.'?'.http_build_query($request); return file_get_contents($urlFull); } //API URL. $apiUrl = 'https://gate.mobica.bg/numberlookup.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'number' => ' Your number here! ', 'url' => '', 'reference' => '', 'email' => '', ]; echo send($apiUrl, $data);

POST REQUEST

<?php /** * @param $url * @param array $request * @return mixed */ function send($url, Array $request) { $ch = curl_init(); $options = [ CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($request), CURLOPT_RETURNTRANSFER => true, ]; curl_setopt_array($ch, $options); $response = curl_exec($ch); curl_close($ch); return $response; } //API URL. $apiUrl = 'https://gate.mobica.bg/numberlookup.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'number' => ' Your number here! ', 'url' => '', 'reference' => '', 'email' => '', ]; echo send($apiUrl, $data);

VAS MO (VALUE-ADDED SERVICE MOBILE ORIGINATED)

VAS MO is an automatic report that shows the status of each valid VAS SMS. Please provide valid URL address to Mobica support. We send VAS MO by POST JSON request to your link.

VAS MO JSON REQUEST SAMPLE

<'Your URL'>

{ "idd":" 0800fc577294c34e0b28ad2839435945 ", "sh_number":" 1221 ", "message":" Text ", "phone":" 359XXXXXXXXX ", "operator":" Name ", "date":" 2020-02-02 10:02:02 ", }

PARAMETERS

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
Table 13

YOUR RESPONSE

OK (some successful text) : SMS auto resend text

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.

DLR (DELIVERY REPORT)

DLR is an automatic report that shows the status of each valid SMS. Please provide valid URL address to Mobica support. We send DLR by GET request to your link.

DLR GET REQUEST SAMPLE

<'Your URL'>?id=15552&phone=359888888888&chanel=SMS&status=1000&desc=Delivered&date=2020-02-02 09:10:55

PARAMETERS

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
Table 14

DLR STATUS

# 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
Table 15

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)
Table 16

REQUEST URL

https://gate.mobica.bg/checkDLR.php?user=<'username'>&pass=<'password'>&idd=<'user_idd_ref_one_sms'>

RESPONSE

1000 //SMS is delivered

EXAMPLE PHP

<?php /** * @param $url * @param array $request * @return bool|string */ function get($url, Array $request) { $urlFull = $url.'?'.http_build_query($request); return file_get_contents($urlFull); } //API URL. $apiUrl = 'https://gate.mobica.bg/checkDLR.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', 'idd' => ' Unique identification number of your short text message! ', ]; echo get($apiUrl, $data);

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
Table 17

REQUEST URL

https://gate.mobica.bg/check_money.php?user=<'username'>&pass=<'password'>

RESPONSE

10 Лв. //Your money

EXAMPLE PHP

<?php /** * @param $url * @param array $request * @return bool|string */ function get($url, Array $request) { $urlFull = $url.'?'.http_build_query($request); return file_get_contents($urlFull); } //API URL. $apiUrl = 'https://gate.mobica.bg/check_money.php'; //API data array. $data = [ 'user' => ' Your username here! ', 'pass' => ' Your password here! ', ]; echo get($apiUrl, $data);
Изберете как да се свържете с нас.