Using the App SID, then receive a Response that includes your JWT access-token, which you will then provide in the Authorization each API
Application Id
POST https://api.tawasolsms.com/auth.php
{
"success": true,
"code": 200,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJBcHBTaWQiOiJjdlNjNFQ4TlcxVIiwiVGltZVpvbmUiOiJBc2lhXC9SaXlhZGgifQ.hmHXX9Qg4ea7c0peI",
"ValidTill": "2024-04-17 10:24:01",
"TimeZone": "Asia/Riyadh"
}
Use messages endpoint to send Single or Bulk SMS, Authorized using token or AppSid. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.
Applcation Id
Message content
Mobile number, International format
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161020044837432",
"2404161020044867442"
],
"MessageContent": "Your URL is https://tawasolsms.com",
"Status": "Sent",
"totalSms": 2,
"totalRecipients": 2,
"Balance": "178051",
"Recipient": "966xxxxxxxx1,966xxxxxxxx2",
"TimeCreated": "2024-04-16 10:18:45",
"bulkId": "Bulk661e2655636b2"
}
}
Simple Single or Bulk SMS using SOAP included username and password. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.
Username
Password
Sender Id
Mobile number
Message content
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:pmm="http://pmmsoapmessenger.com/">
<soapenv:Header/>
<soapenv:Body>
<pmm:SendSms>
<pmm:user>
<pmm:CustomerID>10008</pmm:CustomerID>
<pmm:Name>SendXXXL</pmm:Name>
<pmm:Language>en</pmm:Language>
<pmm:Password>X0@12233</pmm:Password>
</pmm:user>
<pmm:originator>Tawasol</pmm:originator>
<pmm:smsText>Call me later pls</pmm:smsText>
<pmm:recipientPhone>966xxxx</pmm:recipientPhone>
<pmm:messageType>Latin</pmm:messageType>
<pmm:defDate>20150530120000</pmm:defDate>
<pmm:blink>0</pmm:blink>
<pmm:flash>0</pmm:flash>
<pmm:Private>0</pmm:Private>
</pmm:SendSms>
</soapenv:Body>
</soapenv:Envelope>
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:success>true</soapenv:success>
<soapenv:message>ok</soapenv:message>
<soapenv:errorCode>ER-00</soapenv:errorCode>
<soapenv:data>
<soapenv:MessageID>
<soapenv:0>2408151248475109000</soapenv:0>
</soapenv:MessageID>
<soapenv:MessageContent>Call me later pls</soapenv:MessageContent>
<soapenv:Status>Sent</soapenv:Status>
<soapenv:totalSms>1</soapenv:totalSms>
<soapenv:totalRecipients>1</soapenv:totalRecipients>
<soapenv:Balance>Not requested</soapenv:Balance>
<soapenv:Recipient>966xxxxxx</soapenv:Recipient>
<soapenv:TimeCreated>2024-08-15 12:48:47</soapenv:TimeCreated>
</soapenv:data>
</soapenv:Body>
</soapenv:Envelope>
Simple Single or Bulk SMS using URL parametrs included username and password. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.
Username
Password
Sender Id
Mobile number
Message content
The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic
GET https://api.tawasolsms.com/index.php?user=user1&pass=pass@test&sid=Tawasol&mno=966xxxxxxxx1&text=test sms&type=1
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161030002475032"
],
"MessageContent": "test sms",
"Status": "Sent",
"totalSms": 1,
"totalRecipients": 1,
"Balance": "178050",
"Recipient": "966xxxxxxxx1",
"TimeCreated": "2024-04-16 10:28:42",
"bulkId": "Bulk661e28aa1c504"
}
}
Using Username and API Key, then receive a Response that includes your JWT access-token, which you will then provide in the Bearer token Authorization or in the header of each API with key name: access-token
Application Key / Access Key
Username
POST https://api.tawasolsms.com/auth.php
{
"success": true,
"code": 200,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InJzYWxlaDIiLCJwYXNzd29yZCI6IlgwQGNrMTMiLCJWYWxpZFRpbGwiOiIyMDI0LTA0LTE3IDEwOjI5OjU0IiwiVGlt",
"ValidTill": "2024-04-17 10:29:54",
"TimeZone": "Asia/Riyadh"
}
Use messages endpoint to send Single or Bulk SMS. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.
The name of the message sender
The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic
Message Content
Mobile number
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161036577139772"
],
"MessageContent": "Your URL is: https://1l.ae/a",
"Status": "Sent",
"totalSms": 1,
"totalRecipients": 1,
"Balance": "178048",
"Recipient": "966xxxxxxxx1",
"TimeCreated": "2024-04-16 10:36:58",
"bulkId": "Bulk661e2a9a38ffb"
}
}
Use Bulk endpoint to send Bulk SMS . This can be achieved by sending an CSV file having the recipients phone numbers . When you send Bulk SMS request using this API, the API will return to you the Bulk ID to track them later.
The name of the message sender
The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic
Set it to true, if the messageText contains URL and you want to shorten it
Message Content
The CSV file that have the intended recipients phone numbers.
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161047527697872",
"2404161047527727882",
"2404161047527747892"
],
"MessageContent": "Your file url is https://1l.ae/b",
"Status": "Sent",
"totalSms": 3,
"totalRecipients": 3,
"Balance": "178038",
"Recipient": "966xxxxxxxx1,966xxxxxxxx2,966xxxxxxxx3",
"TimeCreated": "2024-04-16 10:46:33",
"bulkId": "Bulk661e2cd9ac25c"
}
}
In case you want to send bulk SMS to predefined groups of recipients, use Send SMS to Groups API. The API will return to you the messages’ ID to track them later using Get Message Details by ID API.
Using Send SMS to Groups API is quite simple. First, submit an HTTP Request with the group’s name, the message text, and other important parameters, and then receive a Response that includes the SMS IDs.
The name of the message sender
The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic
Set it to true, if the messageText contains URL and you want to shorten it
Message Content
Predefined group name
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161053391228152",
"2404161053391258162",
"2404161053391278172",
"2404161053391298182",
"2404161053391318192",
"2404161053391338202"
],
"MessageContent": "test sms",
"Status": "Sent",
"totalSms": 6,
"totalRecipients": 6,
"Balance": "178026",
"Recipient": "966xxxxxxxx1,966xxxxxxxx2,966xxxxxxxx3,966xxxxxxxx4,966xxxxxxxx5,966xxxxxxxx6",
"TimeCreated": "2024-04-16 10:52:20",
"bulkId": "Bulk661e2e3411297"
}
}
You can track any SMS you have sent using its ID by submitting the Get Message Details by ID API request. The API will return the details of the SMS message you want to track, such as the account ID that sent the SMS, SMS delivery status and the SMS sent date.
Message Id
GET https://api.tawasolsms.com/dlr.php?message_id=2404161053391228152
{
"success": "false",
"message": "2404161053391228152",
"errorCode": "ER-01",
"data": []
}
You can track any Bulk SMS you sent using its Bulk ID in the API request. The API will return the details of the SMS Campaign you want to track, such as the Number of SMS Sent, Delivered & Undelivered in an SMS Campaign.
Bulk Id
GET https://api.tawasolsms.com/bulk.php?bulkId=Bulk661e2cd9ac25c
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"id": "Bulk661e2cd9ac25c",
"total": "113000",
"delivered": "105000",
"sent": "113000",
"undelivered": "0",
"inProgress": "8000"
}
}
You can know the count of SMS messages you have sent during a certain period. The API will return an integer that represents the count of SMS messages sent during the provided date range in the API request.To use Get Sent Messages Count API, first submit an HTTP Request with the date range, then receive a Response that includes the count of SMS messages sent during the provided date range.
GET https://api.tawasolsms.com/count.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"Count": 216362
}
}
You can track the messages you have sent during a certain period by submitting the Get Messages Details. The API will return an array of multiple records. Each record includes the details of an SMS message that was sent during the provided date range in the API request. You can also specify the number of SMS messages you want to receive per response page, as well as the response page index number you want to receive.
GET https://api.tawasolsms.com/messages.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": [
{
"Id": "2024040512525322521",
"AccountId": "783",
"RequestId": "375295152",
"Sender": "Cequens",
"MessageText": "Test Message",
"Recepient": "966xxxxxxxx1",
"Status": 3,
"SentDate": "2024-04-05T11:49:18.713Z"
},
{
"Id": "2024040512525322522",
"AccountId": "783",
"RequestId": "161541572",
"Sender": "Cequens",
"MessageText": "Test Message",
"Recepient": "966xxxxxxxx2",
"Status": 1,
"SentDate": "2024-04-05T12:38:58.216Z"
}
]
}
Through Get Your Current Balance API, you can directly retrieve your current account balance. You can also get the current balance.
GET https://api.tawasolsms.com/balance.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"Balance": "178026"
}
}
Personalized SMS is a type of Short Messages that generated from rendering a template , A template is a text that contains a special text that contains variables, Those variable got substituted at the runtime.
Sender Id
Message Content
The intended recipients’ phone numbers comma separated
An array variablesLists. The delimiters between each variable list is the ';' . and the delimiters between variables are commas ','
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"MessageID": [
"2404161120325302182",
"2404161120325332192"
],
"MessageContent": "Hi employeeX your Salary is 500$",
"Status": "Sent",
"totalSms": 2,
"totalRecipients": 2,
"Balance": "178023",
"Recipient": "966xxxxxxxx1,966xxxxxxxx2",
"TimeCreated": "2024-04-16 11:19:13",
"bulkId": "Bulk661e3481739a7"
}
}
Use Personalized Bulk endpoint to send Bulk SMS with different message text. The Endpoint accepts CSV file contains recipient numbers with corresponding message text.
The name of the message sender
The CSV file that have the intended recipients phone numbers and message content for each number.
POST https://api.tawasolsms.com/index.php
{
"success": "true",
"message": "ok",
"errorCode": "ER-00",
"data": {
"Balance": "178017",
"faileds": [],
"sendErrors": [],
"bulkId": "Bulk661e34fe556ac",
"totalRecipients": 3,
"totalSms": 3,
"messages": [
{
"MessageID": [
"2404161122388024072"
],
"MessageContent": "Hello world test message",
"Status": "Sent",
"totalSms": 1,
"Recipient": "966xxxxxxxx1",
"TimeCreated": "2024-04-16 11:21:19"
},
{
"MessageID": [
"2404161122400384102"
],
"MessageContent": "Hello world test message 31",
"Status": "Sent",
"totalSms": 1,
"Recipient": "966xxxxxxxx2",
"TimeCreated": "2024-04-16 11:21:20"
},
{
"MessageID": [
"2404161122402094112"
],
"MessageContent": "Hello world test message 311",
"Status": "Sent",
"totalSms": 1,
"Recipient": "966xxxxxxxx3",
"TimeCreated": "2024-04-16 11:21:20"
}
]
}
}