Custom Web Form
When a SUMOTEXT client wants to initiate an opt-in (and collect profile data) from the client's own web form, they will post an HTTPGET request (in an HTML form) to the following URL with ALL 15 query string parameters.
Parameters
Param | Description |
---|---|
shortcode |
Short code used. |
key |
Should reflect the keyword being used. |
phone |
The mobile number opting in. |
txt1 |
Profile data field that matches the web form in the Sumotext online tools. |
txt2 to txt11 |
Up to 11 form fields for profile data. Fields not used should be left blank. |
Example HTML Form
The following HTML form will properly form the GET querystring for submitting an opt-in from a custom web form. Note: For txt#
fields that you're not using, set the txt#
input fields to type="hidden"
so that they're included in the querystring, but not shown to the user.
<form action="http://mosms.sumotext.com/mOptinMO.aspx?" method="GET"> Shortcode: <input type="text" name="shortcode" /><br /> Key: <input type="text" name="key" /><br /> Phone: <input type="text" name="phone" /><br /> Custom parameter: <input type="text" name="txt1" /><br /> <!-- set the remaining 'txt#' fields to 'type="hidden"' and a blank value so that their params are still included in the GET --> <input type="hidden" name="txt2" value="" /> <input type="hidden" name="txt3" value="" /> <input type="hidden" name="txt4" value="" /> <input type="hidden" name="txt5" value="" /> <input type="hidden" name="txt6" value="" /> <input type="hidden" name="txt7" value="" /> <input type="hidden" name="txt8" value="" /> <input type="hidden" name="txt9" value="" /> <input type="hidden" name="txt10" value="" /> <input type="hidden" name="txt11" value="" /> <input type="submit" value="Submit" /> </form>
Sample HTTP Call
To show what the HTTP request looks like:
http://mosms.sumotext.com/mOptinMO.aspx?country=USA&shortcode=69872&key=SUMO&phone=5012474110&txt1=??&txt2=??&txt3=??&txt4=??&txt5=??&txt6=??&txt7=??&txt8=??txt9=??&txt10=??&txt11=??