Favlet: Clickatell SMS sender


/ Published in: JavaScript
Save to your folder(s)

I made this simple JavaScript to save me time. I was sick of having to thumb-bash on a tiny keypad or login to the slow Clickatell site and use their clunky interface (nothing it simpler than 2 text boxes and an OK button).

You will need an HTTP API POST account with Clickatell's Bulk SMS Gateway. I choose them as they are reliable and they are under half the price of most local providers (and they have simple, well documented APIs)

This script is on 1 line intentionally. In your favourite browser create a new bookmark with this as the URL/address. Change the 'username', 'password' and 'api_id' values to your own. Then test it out. Easy.

NOTE: It's not that pretty but you get sent to the API output on submission. If you get a session ID it all went OK, if not you will get an error with a simple explanation of what went wrong.


Copy this code and paste it in your HTML
  1. javascript:var username = 'CLICKATELL-USERNAME'; var password = 'CLICKATELL-PASSWORD'; var api_id = 'CLICKATELL-APIID '; var recipient = prompt('To: (international mobile number)', '61412888999'); if (recipient) var message = prompt('Message: (over 160 characters will send multiple SMS)', '61412888999'); if (recipient && message) window.location.href = 'http://api.clickatell.com/http/sendmsg?user=' + username + '&password=' + password + '&api_id=' + api_id + '&to=' + recipient + '&text=' + message

URL: http://affiliates.clickatell.com/central/campaigns/redir.php?cid=29705

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.