Welcome to TextMarks Lite - free ad-supported text messaging platform. Visit our main site for ad-free service. Free trial available!

Mobilize your world
Home
Tour
Buzz
Developers Center
Help

Messaging.subscribe

Request to subscribe a user by phone# to one of your TextMarks. User gets "Rply Y to subscribe..." SMS to confirm.

 

Overview

Requests to subscribe a user by phone# to one of your TextMarks. If the user is already subscribed, nothing happens. Otherwise an SMS is sent to the user's phone prompting them to "Reply Y to subscribe to KEYWORD...". Once they confirm by replying Y (by text), they will be subscribed to your TextMark, and you will be able to broadcast alerts and send texts to them. See Sending Text Messages for more information on subscribers and other ways for users to subscribe.

Parameters

Parameter Description
apik API Key
auth_user TextMarks user name to authenticate with.
auth_pass TextMarks user password to authenticate with.
tm TextMark keyword subscribe user to. Must belong to auth_user.
phone Phone# of user to subscribe.
desc (Optional) Description of your service to show to user. May include clickable URLs.
NOTE: Use of this parameter is only available in conjunction with TextMarks Pro Service.

Response

Result code (TMResponse.TMHead.ResCode) of 0 indicates success. Errors (non-zero result) will be described in TMResponse.TMHead.ResMsg.

Subscription Callbacks

To determine if a user actually subscribes (since they may not reply Y or the phone# may not even be valid), you may take advantage of your TextMark's Subscription Callback. See Developer Extension for more information.

Additional Info / Troubleshooting

If a user has recently (within 24hr) received a "Rply Y to subscribe" type message from your TextMark as a result of this API call or (or widget), and that user has not yet replied Y, then the Messaging.subscribe API call will return success, but NO ADDITIONAL MESSAGE will be sent to the user.

This may appear to make developing and troubleshooting more difficult, but it is an important safeguard to prevent abuse and mobile SPAM. TextMarks remains dedicated to providing a powerful and safe platform for users and developers.

To get around this during development, you may use additional phone#s for testing, or simply reset the pending subscription request on a specific phone# by making a Messaging.subscribe call with an alternate keyword or by typing your phone# into a subscription widget for another keyword.

Examples

Example 1: HTTP Request (whitespace added for clarity):

http://dev1.api.textmarks.com/Messaging/subscribe/?
&apik=MyAPIKey_12345
&auth_user=mytmuser
&auth_pass=mytmpass
&tm=MYKEYWORD
&phone=4155551212

Example 1: XML Response:

<?xml version="1.0" ?>
<TMResponse v="1.0">
	<TMHead>
		<APIVersion>2.41a-BETA</APIVersion>
		<ResCode>0</ResCode>
		<ResMsg>Success</ResMsg>
		<APIKey>MyAPIKey_12345</APIKey>
		<RefNum>R1001-8904321863</RefNum>
	</TMHead>
	<TMBody>
		<SubscriptionPending key="123456" keyword="MYKEYWORD">
			<TextMark>MYKEYWORD</TextMark>
			<Phone>+14155551212</Phone>
		</SubscriptionPending>
	</TMBody>
</TMResponse>
			
 
Service available on the following wireless networks: AT&T, Verizon Wireless, Sprint, T-Mobile, Virgin, Cricket, Alltel.
v2.69a-BETA  -  Copyright © 2008 TextMarks Inc. All rights reserved.