Professional Documents
Culture Documents
Arad - SMS.Hub API en
Arad - SMS.Hub API en
www.arad-itc.com
ARAD ITC
Arad API gateway user manual
Arad ITC
Contents
Introduction ..................................................................................................................... 2
Call services .................................................................................................................... 2
Calling the Basic Authentication method ......................................................................... 2
Receive bearer token ...................................................................................................... 2
Send SMS ....................................................................................................................... 4
Receive a message ....................................................................................................... 10
Get message status ...................................................................................................... 11
Receive messages via Pull ........................................................................................... 12
Receive delivery through Pull ........................................................................................ 14
Get user information ...................................................................................................... 16
Error codes.................................................................................................................... 17
1|Page
Arad API gateway user manual
Arad ITC
Introduction
Arad's short message portal provides the possibility of providing various message-
based APIs. Developers can access the services by joining the Arad portal.
Call services
Web services can be called in two ways. The first method is called basic
authentication, which is not recommended due to security weaknesses. In the
second method, you can call other services by calling the Arad TSP service using
the received token (bearer token) from this service. Also, for the operational use
of the services, you must declare your IP to Arad so that you can access the
services.
2|Page
Arad API gateway user manual
Arad ITC
header values
Method POST
Content-type x-www-form-urlencoded
address https://baseAddress/connect/token
parameters
scope {your_scope}
username {your_username}
password {your_password}
property type
access_token string
expires_at long
scope string
Sample answer:
{
"access_token": "Your token",
"expires_at": "2022-08-01T05:02:37Z",
"scope": "ApiAccess"
}
3|Page
Arad API gateway user manual
Arad ITC
Send SMS
To send SMS, you can send a list of messages to the web service.
header values
Method POST
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/send
parameters
SourceAddress {Sender}
DestinationAddress {Receiver}
MessageText {Message text}
ValidityPeriod {DateTime}
ValidityPeriod date should not be less than one minute and more than 6 hours
(relative to the current time).
Return identifiers for successful messages are UID format and string type. If the
user needs a return ID in the form of Long, he can use the send address as follows:
https://baseAddress/api/message/send?returnLongId=true
4|Page
Arad API gateway user manual
Arad ITC
Sample answer:
{
"message": "Successfully done.",
"succeeded": true,
"data": [
"624ed1bbcd0efb1ef148e0a0",
"624ed1bbcd0efb1ef148e0a1"
],
"resultCode": 100
}
5|Page
Arad API gateway user manual
Arad ITC
To send bulk SMS, you can send messages to the web service as follows.
header values
Method POST
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/bulk
parameters
SourceAddress {Sender}
DestinationAddress List<{Receiver}>
MessageText {Message text}
ValidityPeriod {DateTime}
ValidityPeriod date should not be less than one minute and more than 6 hours
(relative to the current time).
Return identifiers for successful messages are UID format and string type. If the
user needs a return ID in the form of Long, he can use the send address as follows:
https://baseAddress/api/message/bulk?returnLongId=true
6|Page
Arad API gateway user manual
Arad ITC
Sample answer:
{
"message": "Successfully done.",
"succeeded": true,
"data": [
"624ed1bbcd0efb1ef148e0a0",
"624ed1bbcd0efb1ef148e0a1"
],
"resultCode": 100
}
7|Page
Arad API gateway user manual
Arad ITC
To send a single SMS through the Get method, you can send the messages to the
web service as follows.
header values
Method GET
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/send
parameters
SourceAddress {Sender}
DestinationAddress {Receiver}
MessageText {Message text}
Return identifiers for successful messages are UID format and string type. If the
user needs a return ID in the form of Long, he can use the send address as follows:
https://baseAddress/api/message/send?returnLongId=true
8|Page
Arad API gateway user manual
Arad ITC
Sample request:
https://baseAddress/api/message/send?SourceAddress=989000xxxx&DestinationAddre
ss=98912xxxxxxx&MessageText=test
Sample answer:
{
"message": "Successfully done.",
"succeeded": true,
"data": [
"62e760d2393e38af65bb9e4e"
],
"resultCode": 100
}
9|Page
Arad API gateway user manual
Arad ITC
Receive a message
In order to receive MO or received messages, the subscriber must choose one of
the receiving methods through Get, Post, Push or SMPP. In Get or Post mode, the
end point of receiving should be provided to Arad. The username and password
parameters are optional and if the subscriber provides these parameters to Arad,
Arad will send these parameters as basic authentication.
In the method of receiving through Push, the subscriber must implement the
Arad.Q client service on his side.
In the method of receiving through SMPP, it is also done in the standard way of
this protocol.
The parameters sent through the Get or Post method are in the form of a list of
the following parameters:
property type
text string
from string
to string
property type
MessageText string
SourceAddress string
DestinationAddress string
ReceiveDateTime string
10 | P a g e
Arad API gateway user manual
Arad ITC
In the method of receiving through SMPP, it is also done in the standard way of
this protocol. The parameters sent through the Get or Post method are in the form
of a list of the following parameters:
property type
batchId string
status string
Mobile string
partNumber string
property type
MessageId string
DateTime string
Mobile string
PartNumber string
Status string
FullDelivery bool
11 | P a g e
Arad API gateway user manual
Arad ITC
header values
Method GET
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/getmo
If you want to receive a unique ID for each message, you can put the optional
parameter returnId=true at the end of Address.
12 | P a g e
Arad API gateway user manual
Arad ITC
"succeeded": false,
"resultCode": 109
}
If you want to retrieve the received messages of a specific time, you can use the
following method:
header values
Method GET
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/getmobydate
property type
startDateTime DateTime
endDateTime DateTime
If you want to receive a unique ID for each message, you can put the optional
parameter returnId=true at the end of Address.
13 | P a g e
Arad API gateway user manual
Arad ITC
header values
Method POST
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/message/getdlr
parameters
List<string> Message Ids
property type
message string
succeeded bool
data string
resultCode int
The data parameter contains the status list.
If, when sending a message, the user has requested long return identifiers, he
should also use the following address when inquiring about the status:
https://baseAddress/api/message/getdlr?returnLongId=true
14 | P a g e
Arad API gateway user manual
Arad ITC
Sample answer:
{
"message": "Successfully done.",
"succeeded": true,
"data": [
{
"id": "624ed1bbcd0efb1ef148e0a0",
"partStatus": [
{
"item1": 1,
"item2": 34,
"item3": "2022-04-07T11:57:50.044Z"
}
],
"deliveryStatus": 34
},
{
"id": "624ed1bbcd0efb1ef148e0a1",
"partStatus": [
{
"item1": 1,
"item2": 1,
"item3": "2022-04-07T11:57:50.043Z"
}
],
"deliveryStatus": 1
}
],
"resultCode": 100
}
The partStatus field shows the value of item1, the number of the message part, the
value of item2, the status, and item3, the time of the status. The deliveryStatus
field also shows the overall status.
15 | P a g e
Arad API gateway user manual
Arad ITC
header values
Method GET
Authorization Bearer {your access token} | Basic
address https://baseAddress/api/user/userinfo
The answer is as follows:
property type
message string
succeeded bool
data string
resultCode int
The data parameter contains a list of information.
A sample answer is as follows:
{
"message": "Successfully done.",
"succeeded": true,
"data": {
"userName": "username",
"firstName": "name",
"lastName": "family",
"credit": 5000.0,
"mps": 1000,
"senderIds": [
"989000xxxx",
"9890001xxx"
]
},
"resultCode": 100
}
16 | P a g e
Arad API gateway user manual
Arad ITC
Error codes
Explanation Error Code
Error sending Send Error 0
Insufficient inventory Not Enough Credit -1
Server error Server Error -2
Account is disabled DE ACTIVE Account -3
Account has expired Expired Account -4
The username or password is incorrect Invalid Username or Password -5
Error in authentication Authentication Failure -6
The server is busy Server Busy -7
The recipient's number is blacklisted Number At Backlist -8
Daily submission limit Limited In Send Day -9
Limitation on sending speed Limited In Volume -10
The sender number is not valid Invalid Sender Number -11
The recipient's number is not valid Invalid Receiver Number -12
The receiving operator is not valid Invalid Destination Network -13
Unreachable network Unreachable Network -14
The sender's number is inactive DE ACTIVE Sender Number -15
The sender number format is wrong Invalid Format of Sender Number -16
There is no charge for this shipment Tariff Not Found -17
The IP address of the sender is not Invalid Ip Address -18
valid
The submission template is not valid Invalid Pattern -19
The sender's number has expired Expired Sender Number -20
The content of the message contains a Message Contains Link -21
link
17 | P a g e