Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

aSMSC API

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

SMS ALA Web API

1. Sending SMS Through API


1.1 Parameters 1.2Calling API using GET Request
1.2.1 Method-1: Using Get Request
1.2.2 Method-2: Using POST Request
1.2.3 Response Details
1.3 Enquiring Delivery Status
1.3.1 Parameters
1.3.2 Calling Delivery Report API Using, Method-1 Get Request
1.3.3 Calling Delivery Report API Using, Method-2 Post Request
1.3.4 Response Format for Both GET AND POST
1.3.5 Response Details
2 Managing Contact Lists through API
2.1 Add Number to Contact List through API
2.1.1 Parameters List
2.1.2 How to Get Contact List ID
2.1.3 Calling Contact List API using Method 1 (GET REQUEST)
2.1.4 Calling Contact List API using Method 2 (POST REQUEST)
2.1.5 Response Format for Both GET AND POST
2.1.6 Response Details
2.2 Deleting Number from Contact List using API
2.2.1 Parameters List
2.2.2 Calling Delete Contact Using API, Method 1, Get Request
2.2.3 Calling Delete Contact Using
API, Method 2, POST Request
2.2.4 Response Format for Both GET AND POST
2.2.5 Response Details
3 SMSala Verify API - Sending OTP Verification SMS
3.1 Sending Verification SMS
3.1.1Calling the SMSala Verify API using Get Request
3.1.2Calling the SMSala Verify API using POST Request
3.1.3 Response Format for Both GET AND POST
3.1.4 Response Details
3.2 Checking Verification Status
3.2.1 Checking the verification Status Using Get Request
3.2.2 Checking the verification Status Using Get Request
3.2.3 Response Format for Both GET AND POST
3.2.4 Response Details

1.0 Sending SMS Through Web API


Send SMS to URL: http://api.smsala.com/api/SendSMS

1.1 Parameters
Parameter Name Required Description Example
api_id Yes Your API ID Sent in Email API43404236

api_password Yes Your SPI Password Sent in Email password@123


sms_type Yes SMS Type Promotional / P for Promotional
Transactional T for Transactional
encoding Yes SMS Encoding Text, Unicode etc. T for Text
U for Unicode
FS for Flash Message
UFS for Unicode Flash Message
sender_id Yes Your Sender ID Your Registered Sender ID
phonenumber Yes Recipient Phone Number Phone Number Should No Contain +
Sign
Phone Number Format is Country
Code + Phone Number
Example: 919622333345
templateid Optional Required If You Want to Send Template ID from Customer Panel
Existing Template. Check Example: 10
Template ID in Customer Panel
textmessage Conditional If Template ID is provided text Text of SMS Message to Send
message is not required
V1 Optional Variable 1 To Replace in Any Data for Variable 1 You Want
Template to Replace
V2 Optional Variable 2 To Replace in Any Data for Variable 2 You Want
Template to Replace
2
V3 Optional Variable 3 To Replace in Any Data for Variable 3 You Want
Template to Replace
V4 Optional Variable 4 To Replace in Any Data for Variable 4 You Want
Template to Replace
V5 Optional Variable 5 To Replace in Any Data for Variable 5 You Want
Template to Replace

1.2 Calling The API


1.2.1 Method-1: Using Get Request
Example:
http://api.smsala.com/api/SendSMS ?api_id=API4623444906&api_password=password@123&sms_type=P&encodin
g=T&sender_id=tstala&phonenumber=91999020323&textmessage=test

1.2.2 Method-2: Using POST Request

Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"sms_type": T,
"encoding": T,
"sender_id": tstala,
"phonenumber": 919990123312,
"templateid": null,
"textmessage":test message,
"V1": null,
"V2": null,
"V3": null,
"V4": null,
"V5": null
}

3
Response Format for Both GET AND POST

{
"message_id": 4125,
"status": "S",
"remarks": "Message Submitted Successfully"
}

Response Details.

message_id System Generated Message ID


status S = Submitted
F = Failed to Submit
remarks Description of the status

1.3 Query Delivery Report / Message Status


URL: http://api.smsala.com/api/GetDeliveryStatus

1.3.1 Parameters
Parameter Name Required Description Example
message_id Yes Message ID You Received at The 4134
Time of Submit

1.3.2 Calling Delivery Report API Using, Method-1 Get Request


Example: http://api.smsala.com/api/GetDeliveryStatus?message_id=2323

1.3.3 Calling Delivery Report API Using, Method-2 Post Request


Post Request JSON Format

{
" message_id ": 32423
}

1.3.4 Response Format for Both GET AND POST

{
"message_id": 32,
"PhoneNumber": "9713254",
"SMSMessage": "Test Message",
4
"MessageType": "Default",
"MessageLength": 159,
"MessageParts": 1,
"ClientCost": 1,
"DLRStatus": "Delivered",
"SMSID": "9cbd20a1-0cd8-420e-b384-5767b7df7a87",
"ErrorCode": 0,
"ErrorDescription": "000",
"SentDateUTC": "2017-05-05T10:16:39.523",
"Remarks": "OK"
}

1.3.5 Response Details

message_id Message ID of the request


PhoneNumber Phone Number to which message was sent
SMSMessage Text of the SMS message
MessageType Message Encoding
MessageLength Length of Message
MessageParts No of Message parts
ClientCost Amount Deducted from account
DLRStatus Delivery Status Can Be One Of the following
1. Pending
2. Delivered
3. Undeliverable
4. Acknowledged
5. Expired
6. Accepted
7. Rejected
8. Unknown
9. Failed
10. DND
SMSID Carrier Generated SMS ID
ErrorCode Error Code If Any
ErrorDescription Error Description If Any
SentDateUTC SMS Sent Date Time in UTC (Universal Time Coordinate)
Remarks Remarks for the Request

5
2.0 Managing Contact Lists through API

2.1 Add Number to Contact List through API


2.1.1 Parameters List
Parameter Name Required Description Example
api_id Yes Your API ID Received in the email or API0896731286
you can get it from your customer
panel
api_password Yes Your API Password Received in the password@123
email or can change API password
from customer panel
contact_list_id Yes Create Contact List in Customer Panel 1
and Get the ID from There See Image
Below for Detailed Explanation
contact_name Yes Name of the person you want to save John
contact_number Yes Contact Number of the person you 919990785632
want to save

2.1.2 How to Get Contact List ID


Step 1. Login in your Customer Panel At http://my.smsala.com

Step 2. Go to Contact List in The Left Side Menu Bar

Step 3. Click on Add New Contact List Button & Create a new Contact List

Step 4. Enter Contact List Name and Click Create New Contact List

6
Step 5 : Once Created You Will Find Contact List ID in the Grid Below

Yellow Color Highlighted Is Your Contact List ID

2.1.3 Calling Contact List API using Method 1 (GET REQUEST)

Example:
http://api.smsala.com/api/AddC ontact?api_id=API3434144906&api_password=passwor
d&contact_list_id=1&contact_name=Test&contact_number=919990206824

2.1.4 Calling Contact List API using Method 2 (POST REQUEST)

URL: http://api.smsala.com/api/AddContact

Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"contact_list_id": 1,
"contact_name": Test,
"contact_number": 91999020238,
}
7
2.1.5 Response Format for Both GET AND POST

{
"contact_id": 4,
"status": "S",
"remarks": "Contact Created Sucessfully"
}
2.1.6 Response Details

contact_id System generated id of your contact save it for future deletion of this
contact via api.
status S = Contact Created Successfully F
= Failed to create contact
remarks Description of the status

2.2 Deleting Number from Contact List using API


2.2.1 Parameters List

Parameter Name Required Description Example


api_id Yes Your API ID Received in the email or API0896731286
you can get it from your customer
panel
api_password Yes Your API Password Received in the password@123
email or can change API password from
customer panel
contact_id Yes Contact ID You Have Get While 123
Creating the contact from api

2.2.2 Calling Delete Contact Using API, Method 1, Get Request

Example:

8
http://api.smsala.com/api/DeleteC ontact?
api_id=API4das62144906&api_password=pas sword&contact_id=4

2.2.3 Calling Delete Contact Using API, Method 2, POST Request


URL: http://api.smsala.com/api/DeleteContact
Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
" contact_id ": 1,
}

2.2.4 Response Format for Both GET AND POST

{
"contact_id": 0,
"status": "S",
"remarks": "Contact Created Successfully"
}
2.2.5 Response Details

contact_id Value Will Always Be Zero


status S = Contact Deleted Successfully F
= Failed to delete contact
remarks Description of the status

3.0 SMSala Verify API - Sending OTP Verification SMS

This API helps you to verify user phone number using OTP (One Time Password).

3.1 Sending Verification SMS

3.1.1 Calling the SMSala Verify API using Get Request Example:

http://api.smsala.com/api/Verify?api_id=API651344002&api_password=password&bran
d=your_brand_name&phonenumber=91340206824&sender_id=TSTALA

9
3.1.2 Calling the SMSala Verify API using POST Request

URL: http://api.smsala.com/api/Verify
Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"brand": Your_Brand_Name,
"phonenumber": 91999664445,
"sender_id": TSTALA,
}

3.1.3 Response Format for Both GET AND POST


{
"verfication_id": 4,
"status": "S",
"remarks": "Verification Code Sent Successfully"
}

3.1.4 Response Details

verfication_id System generated id of your verification request save it to check


the verification status
status S = Verification SMS Sent Successfully F
= Failed to send verification SMS
remarks Description of the status

3.2 Checking Verification Status

3.2.1 Checking the verification Status Using Get Request.

Example: http://api.smsala.com/api/VerifyStatus?verfication_id=2&verfication_code=4022

3.2.2 Checking the verification Status Using Get Request.


URL: http://api.smsala.com/api/ VerifyStatus

10
Post Request JSON Format

{
"verfication_id": 2,
"verfication_code": 4022,
}

3.2.3 Response Format for Both GET AND POST


{
"verfication_id": 2,
"status": "F",
"remarks": "Verification Code is Not Verified"
}

3.2.4 Response Details

verfication_id Verification ID You Sent in the Request


status V = Verification Successfully F
= Verification Failed
remarks Description of the status

11

You might also like