What is an SMS API?
An API (Application Programming Interface) acts as an interface between the code you write and our SMS Gateway.
SMS messages are sent by making HTTP or HTTPS calls to the API. You can loop through your list of mobile numbers and make HTTP/S requests to send SMS messages to them. Generally, this API should allow you to submit up to about 100 messages per second on average to our platform (or faster if required).
It’s quick to get started (simply copy and paste a URL directly in your web browser to send a message) and there is no need to understand the additional or advanced features unless you want to use them.
Some more information about this API:
HTTP(port 80) and
HTTPS(port 443), both
- You can send to multiple handsets in one single
HTTP/Srequest by comma separating mobile numbers (up to 300 numbers with an
GETand 600 with
POST) – this is useful if you are sending the same message text to all the handsets.
- Supports persistent connections (keep-alive) and the use of multiple concurrent connections.
- Supports the sending of flash messages.
- Supports the sending of binary message content.
- Supports the sending of Unicode messages.
How to use an SMS API
To send your first message you will need:
- The first thing you will need is your API ID.
- Format the mobile number that you want to send to in international format.
– The mobile number needs to start with the country code.
– It must contain no spaces or other non-numeric characters.
– If the mobile number starts with zero, remove the zero before typing the rest of the number.
- Decide on the SMS message text that you want to send. Note that until you make a purchase, we will use pre-defined content for your messages. All URL parameters should be URL encoded.
- Add the details into this URL in a web browser https://api.clickatell.com/http/sendmsg?user=xxxxx&password=xxxxx&api_id=xxxxx&to=xxxxx&text=xxxxx and paste it into the URL bar of your browser to send a message.
- You should see something like:
ID: f7012c1edff2509a19ce1667c7f52b18in your browser (this is a message tracking ID from the API that you can use later).
- If you received an error such as
ERR: 101, Authentication failedyou may need to double-check the parameters that were specified in the URL.
View the send message page for more information and for examples of how to send flash, Unicode or binary messages.
For additional security, you can opt to:
HTTPSfor all API requests
- Enable IP lockdown on your API connection
- Use session ID for authentication instead of passing username and password for each request
Authenticating an API Call
You can authenticate your requests in one of two ways:
- Send a session ID with each request. A session ID can be obtained with the Authentication command.
- Send your API username, password and ID with each request,