Loader

Using the HTTP API


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:
  • Supports HTTP (port 80) and HTTPS (port 443), both GET and POST.
  • You can send to multiple handsets in one single HTTP/S request by comma separating mobile numbers (up to 300 numbers with an HTTP GET and 600 with HTTP 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:
  1. The first thing you will need is your API ID.
  2. 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.
  3. 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.
  4. 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.
  5. You should see something like: ID: f7012c1edff2509a19ce1667c7f52b18 in your browser (this is a message tracking ID from the API that you can use later).
  6. If you received an error such as ERR: 101, Authentication failed you 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.


API Security

For additional security, you can opt to:
  • Use HTTPS for all API requests
  • Use POST instead of GET
  • 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:

  1. Send a session ID with each request. A session ID can be obtained with the Authentication command.
  2. Send your API username, password and ID with each request,

Did you find this information informative?

Other Resources

Ask the Community

Visit Stack Overflow to join our community of developers and find the answer you need

Contact Support

Contact our support team and one of our agents will be in touch with you to answer any questions you have