Follow

Send Message to Phone

The Send SMS Message to Phone command allows you to send an SMS Message to a specified Phone number. The command provides the option to send to a Phone number directly without  predefined message content.  The command requires the following arguments: Command, Realm, Password, Phone Number, and Sender Code.

api_web?r=myrealm&p=mypass&c=smssendmessagetophone&phone=12065551212&sender_code=120162701555&message_text=Your%20message%20is%20delivered

The command is ‘smssendmessagetophone', the realm is ‘myrealm’ and the password is ‘mypass’.  The message will be sent to the Phone number from the sender code '120162701555'.

Example

Using smssendmessagetophone with all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=smssendmessagetophone&phone=12065551212&sender_code=120162701555&message_text=Thanks!

Successful results return:

SUCCESS: Sending message to phone was successful

Results

The Send SMS Message to Phone command outputs either a SUCCESS or FAILURE message. 

Success

The command success message returns the SUCCESS message.  The result format is:

SUCCESS: Sending message to phone was successful

Failure

The command will fail if if the phone number is not found or if an argument is invalid.  The result format is:

FAILURE: [Reason]  

Arguments

The command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=smssendmessagetophone

c=smssendmessagetophone

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Phone

Yes

Numeric phone number for the subscriber.  Do not include special characters (such as parenthesis or dash). 

phone=[phone]

Sender Code

Yes 

Sender Code representing the message sender.  A Sender Code is either a short code or number. It represents the 'from' field when deploying an SMS. The message recipient will see this sender on their mobile device when a message is received.

sender_code=[sender_code]

Message Text

Yes

The message to send, limited to 160 characters. To include spaces, use + or %20 to avoid possible issues with spaces in a URL.

message_text=[text string]

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk