Archive

Posts Tagged ‘SMS API’

New Feature! Low SMS credits warning system.

September 30th, 2009

A new feature has now been built into the SMS gateway, allowing you to specify a contact email address for the sms Gateway and a threshold amount of SMS credits for your account.

Currently this contact email address can be used with a lower threshold of SMS credits, and once the credits in your accounts goes below or matches the threshold the gateway will send a mail to the contact address, alerting that the credits are running low in your account. However, this will only be sent the first time you run low, and will not be sent again until your credits have been above threshold again.

This feature will ensure that your account will never run to 0. This feature is disabled for all existing accounts, so if you want this alert feature enabled, please email me your email address and threshold requirements to smsapi@hostingireland.ie and I will enable this feature for you.

As always, if you have any comments, feedback or suggestions, you can comment below, post on our forum or send an email to smsapi@hostingireland.ie.

sms charges, text messages development , ,

Undocumented gateway response codes

September 9th, 2009

Occasionally the gateway will respond with a response code that is not documented in our site’s Common API responses.

When this happens the response will be coming directly from the mobile network provider rather than generated from our own gateway, as such this is not something that can be documented.

However, these response codes almost always resolve to the phone number you are trying to send an SMS to, check you are using the correct number, and if it is international number, be sure to take a look at the article on International SMS numbers.

As always, if you have any questions please comment below, or register on our forum.

SMS gateway API developement, text messages development , , , , ,

Non alphanumeric characters

August 27th, 2009

When a request to send an SMS is received by our gateway, it is processed by HTTP and some characters can commonly cause errors, which may lead to unpredictable results from your request.

To correct this issue, you should urlencode the message you want to send, so that the HTTP does not interfere with the message, this involves re-writing the message with characters such as & (ampersand) and # (hash) replaced with %23, %26 and so on. If your SMS program is written using PHP, there is a prebuilt function for performing this, which you can see here:
http://ie2.php.net/urlencode

It is important however, that you initially change spaces to ‘+’ before url encoding the message.

As usual, if you have any questions regarding this technology, or anything related to the Hosting Ireland SMS Gateway API, either comment below, or in our forum or email smsapi@hostingireland.ie.

text messages development , ,

multiple text messages

July 23rd, 2009

It is possible to send a text message through the hosting ireland SMS gateway, which is more than one text long, the gateway will automatically split the message into multiple texts and send them seperately to the receiver, where they will be restructured into a single long text message on the receivers phone.

The gateway will automatically charge for the extra messages used as well, so there is no need to worry about using over your quota of messages.

The longest message the gateway can handle is 4 seperate messages, or 640 characters.

If you have any questions, please either comment on this post, or post on our forum, and we will reply as quickly as we can.

sms charges, text messages development , , ,

Credit Balance Request Command

May 19th, 2009

A request sent to the SMS API with correct Authentication details can now request its current balance, using the new Action property.

A sample request is displayed below:

http://sms.hostingireland.ie/?username=USERNAME&password=PASSWORD&action=creditrequest

The usual error messages, documented here apply, as well as a new XML response code, the response code is 101, which implies a succesful credit query, and will also have a log entry ID. an example reply is found below:

<smsapi>
	<result code="101" id="cdaef13616e100fcd9fb80ef15a886ff">561</result>
</smsapi>

This response code can now be used to check for sufficient credits before attempting to send a bulk of SMS messages, this will help prevent issues with your local sending code, and also reduce the load on the SMS API server.

As usual, you can send any feedback on this to smsapi@hostingireland.ie or send a post in our forum.

SMS gateway API developement, text messages development , ,

Common API Responses

April 27th, 2009

Please find below a list of the most common API error responses, and possible reasons and corrections for them.

A response is defined as an error when the code is not 1, as result code 1 denotes an SMS succesfully delivered to the numbers network.

Message: Missing Required Fields Code: 501

Notes: This message means that the gateway did not receive enough information for an attempted delivery to be possible, this will occur when any of username, password, to and message are not supplied, if these are all sent, check that they are being sent as lowercase fields.

Message: Invalid Authentication Data Code: 502

Notes: This message means that either your submitted username was not found in the accounts, or the password supplied did not match the password for the username you sent. This would generally caused by invalid details, but these fields are case-sensitive, so check you sent them in the correct case.

Message: Insufficient Balance Code: 503

Notes: This message will only occur after you are succesfully logged into your account, and means that you do not have sufficient credits to send an SMS, this can only be corrected by topping up your credits balance.

Message: Invalid Recipient Code: 504

Notes: This error means that a problem was detected with the recipient number, most commonly caused by non-numeric characters in the to value.

Message: Error retrieving From Value Code: 511

Notes: This is an issue with the API, if this error is encountered an admin should be notified, along with the result ID.

There are other error messages that can be encountered, but it is unlikely that these will ever happen, if you do get an error that isn’t documented, and you are not sure what it means, please contact us, and we will help you understand the message.

As usual, you can contact us by commenting on these posts, in our forum, or by email to smsapi@hostingireland.ie

Uncategorized , , , ,

SMS logs now available

April 21st, 2009

It has become neccessary to have logs available to users, so that messages sent through our SMS gateway can be investigated in the future.

With this in mind a new feature has been added to the the API, you can now request logs of your messages, using the URL:

http://sms.hostingireland.ie/logRequest/?username=accountName&password=accountPassword[&messageId=messageId]

If messageId is not presented, you will be given the logs for the last 100 (or all if the total is less than or equal to 100) connections from your account.

These logs are presented in XML 1.0 format, and you can see an example log below:

<?xml version="1.0"?>
<logList>
	<log messageId="b7c10d6cbfe5496ec16acda8d0a187d0">
		<entry date="2009-04-21 13:15:27">logged in.</entry>
		<entry date="2009-04-21 13:15:27">999 SMS credits Left.</entry>
		<entry date="2009-04-21 13:15:27">to: 08fgh1414</entry>
		<entry date="2009-04-21 13:15:27">message: test</entry>
		<entry date="2009-04-21 13:15:27">from: 1890987000</entry>
		<entry date="2009-04-21 13:15:27">send result:  Invalid Destination Address</entry>
	</log>
</logList>

If the requested logfile is not in your account, or your login details are incorrect you will receive an error notifying you of the failure to receive a logList, you will also receive an error if you do not yet have any logs for any actions for your account.

Any comments on the logging system or the format of the XML should be entered through our forum, or in reply to this post.

SMS gateway API developement, text messages development , , ,

SMS API XML responses

April 21st, 2009

For easier usage in automated implemenations the responses from the SMS gateway API will now be returned in XML 1.0.

An example response is below:

<smsapi>
	<result code="503" id="8dbcbdf843c817eed5f8898066184412">
		INSUFFICIENT BALANCE
	</result>
</smsapi>

This allows the response to be collected by an XML object and used more dynamic usage than the original error text.

If you have any comments on the XML response codes implementation, please send any information to us, either in our forum or in response to this post.

SMS gateway API developement, text messages development , , ,

IP protection

April 16th, 2009

We have finalised code that allows you to specify what IP address we should expect connections from, and will reject connections coming from any other addresses.

This has been tested succesfully, and is now implemented in the live API.

SMS gateway API developement , ,

Hosting Ireland SMS Gateway

April 16th, 2009

After receiving quite a few requests for bulk SMS services, hostingireland initiated development of an SMS gateway, to allow customers to send SMS to mobile devices around the planet, using an automated script to our SMS API.

After some beta testing the product has recently been completed, and this website and blog have been created to document the progress of the software, and offer support to current customers, and interested users.

We can be contacted at smsapi@hostingireland.ie, or you can make contact with us through our forum at http://www.textmessage.ie/forum.

Any further developments will be posted here in due course.

SMS gateway API developement , ,