Affiliate Login
Swift SMS Gateway logo

Accessing SMS Gateway Using HTTP Get

It is possible to send messages through SMS Gateway using a simple HTTP Get request. The URL is:

http://smsgateway.ca/sendsms.aspx?CellNumber=XXX&MessageBody=XXX&AccountKey=XXX

When making the call, replace all three "XXX" values with the parameters below:

Parameters

  • CellNumber -  The recipient cell phone number. In demo mode, this will be ignored and all messages will be sent to your cell number. This parameter is mandatory and cannot be empty.
  • AccountKey - This is your unique account key which was emailed to you when you created your account. This parameter is mandatory and cannot be empty.
  • MessageBody - This is the body of the message you want to send. The maximum length of an SMS message is 160 characters.  Messages greater than 160 characters will be broken up into multiple messages. This parameter is mandatory and cannot be empty.

Return Value

The Send method returns a single string which may have one of the following values:

On Success:

  • Message queued successfully - Message was queued and will be sent within the next few minutes.

Error Conditions:

  • Cell number is invalid - The cell number was not supplied or was too short. Cell numbers must be in the format "2125551212" or "212-555-1212". The area code should be included, but not the leading "1".
  • Message body was missing - No message was supplied. We do not permit sending blank SMS messages.
  • The account key parameter was not valid - The account key was not supplied or or was less than 9 characters.
  • This account is disabled - The specified account has been disabled by our administrator for violating one or more of our policies.
  • Account key not found - The specified account key cannot be found. Please verify the key and try again.
  • There are no messages remaining on this account - You will need to purchase additional messages.
  • No authorized credit plan found to match this phone number. Please check the number, and ensure you are authorized to send messages to this region - By default, accounts are authorized to send to certain countries only. Please contact us to find out how to send to other regions.
  • Message content is not acceptable, message not sent - Please contact us for details.
  • Time of day at destination falls outside the established time restrictions for your account, message not sent. - For Enterprise level accounts only - optional time-of-day windows can be created to restrict sending.

footer
© 2015 Swift SMS Gateway Inc.