1. Introduction

To enable developers to integrate SMS sending functionality directly into their applications and websites, we have developed a flexible and robust API.

To allow a large number of developers to use our API, it is deployed entirely in C # .NET 4.5, interacting perfectly with any environment or programming language (PHP, C#, VB, Java, Windev, etc)

The following steps will allow you to start sending SMS from your application in minutes:

  • The Base URL (our server):  http://aspsmsapi.com/http/sendsms.aspx
  • Sending Method: POST (only)
  • Above all, login to your account, go to "My Profile" tab and Select "YES" at: Enable API
  • If you want to receive delivery reports in your application, then enter the URL for receiving reports (beginning with http://) in the Report URL field. Note that the variables of the report will be sent to this URL with the POST method (see section 7).
  • On the same page (My Profile) a few lines down, note your apikey (case-sensitive). Save the changes and you are ready to go!

2. Features

  • Send message to one or more destinations
  • Customize Sender ID
  • Sending messages up to 612 characters long (4 pages)
  • Immediate dispatch or schedule message
  • Sending classic or binary message
  • Sending messages in normal mode or flash mode
  • Receive Delivery reports using PUSH or PULL method

3. Parameters

PARAMETER DESCRIPTION PRESENCE
authmode Expected value : http Mandatory
username Your username  (eg. 233261073793) Mandatory
apikey This is your API key. This can be found under your account Mandatory
msg Content of the message to send. Maximum 612 characters (url encoded) * Mandatory
dest

Mobile number of the recipient in international format (e.g. 233261073793). If you want to send the same message to multiple recipients, simply separate the numbers with commas (e.g. 233261073793,233208144407,233302919991).

Important: Put the numbers with the country code without the + or 00.
Mandatory
senderid Sender ID. It can be alphanumeric (11 characters max) or digital (14 characters max). Unless special permission, you must have previously created it under your account. Otherwise, your username will be used as the Sender ID. Mandatory
customid Unique ID allowing you to "track" delivery status of each recipient in your application. Optional
bulkid Allows you to combine all the recipients of the same message within a single reference Optional
date

Used to schedule a message. It must be in the format dd-mm-yyyy hh: mm: ss (day-month-year hours-minutes-seconds).

Example: 21-09-2014 10:30:15. If you provide incorrect or already past date, the message will not be scheduled, but sent immediately.
Optional
type Type of message : text (normal message) OR binary (binary message). By default type is : text Optional

 

4. Server response

After executing your query in the best conditions, the server will return a response a list format:

  • The status of the request
  • The identity of the operator (Network)
  • The Cost of Message
  • The unique ID of the message generated by the server (used to check the delivery status in our system)
  • Your account balance

Example

OK|233261073793|Airtel|0.04|22102014225851e9bc0562

 

5. Failure response

If an error occurs when sending message, the server will return any of the following errors:


MESSAGE DESCRIPTION
ERROR:LOGIN_FAILED Failed to Login
ERROR:MISSING_USERNAME Your Username cannot be found
ERROR:MISSING_APIKEY Your apikey was not provided
ERROR:MISSING_CONTENT No Content or incorrect content
ERROR:MISSING_RECIPIENT No recipient specified
ERROR:MISSING_AUTH_MODE You must indicate http as the authmode variable
ERROR:MISSING_SENDER_ID You have not specified a Sender ID (senderid)
INVALID_COUNTRY_CODE Indication of incorrect country code
INVALID_LENGTH Destination number incorrect (too short)
INVALID_NETWORK_CODE Recipient number does not belong to any of the configured operators
ERROR:LOW_BALANCE Account balance is insufficient to send message

 

6. Delivery report

It is interesting to know the status of the sent message to update your database. To do this, you can use the PUSH method or the PULL method.

1. For the PUSH method, you automatically receive the status (delivery report) of your messages on the URL previously configured on your account (see introduction above)

 

2. The PULL method allows you to run at any time an HTTP request using the GET method to check the status of a message (up to 100 queries per hour)


Example


You need to pass the following variables to the above URL to request for message status:

PARAMETER DESCRIPTION PRESENCE
messageid Unique ID of the message you want to query the status Mandatory
username Username of your account Mandatory
apikey The apikey of your account Mandatory

Example

 

If you provided a link for receipt of delivery status in your account (see introduction above), then expect to receive by the POST method, variables as shown in the next section (Delivery Status Codes)

7. Delivery Status Codes

For each query for the status of a message, either through the PUSH or PULL methods, the server returns a string (list) including:


Variables and interpretations

status Current Status of the message
network Name of Network Operator the number belongs to
cost Cost charged for the message
messageid Unique ID of the message
date Date and Time of the delivery

Example

SUCCESS|233261073793|Airtel|0.04|22102014225851e9bc0562|22/10/2014 16:48:21

Interpretation of codes

OK Message accepted by our server. Attempting to route to Network Operator
ACCEPTED Message delivered to Operator, awaiting delivery response
SUCCESS Message delivered Successfully!
FAILED Message not delivered (failed)
EXPIRED Re-send attempts exceeded, message failed
SCHEDULED Message scheduled to deliver at a later time

 

8. Account balance

You can always check the balance on your account by sending an HTTP request with GET method to the URL:


Parameters

VARIABLES DESCRIPTION
username Username of your account
apikey The apikey of your account

Example

The new disc fly replica watches collection series ladies watch incorporates many replica watch modern and fashionable aesthetic elements in the classic design. Available in 39mm and 36mm sizes, the watch is fake replica watches available in a variety of materials with replica rolex a rich palette of colours.