Text Me the App

When users click your links on desktop, they have the option to text themselves a link to download your app. We provide this by default on every Branch link, but you can also create your own fully-branded Text Me The App page.

Left: Branch default. Right: a customized version.

This document will cover how to create a custom Text Me The App page, as well as a general FAQ for this product.

Branch reserves the right to limit your use of the Text Me The App service and charge for SMS costs at its own discretion. To understand Branch's policies in this regard, please contact your Branch Account Manager or accounts@branch.io at any time for assistance.

When you have set your destination URL from the previous step, go to that page and edit the HTML. Paste the following code snippet into it; this is a fully-functional web page that you can use as a template for your Text Me The App page.

If you have an existing form for users to input their phone number, you can put our Text Me The App behind it. Add the following code somewhere inside the <head></head> tags on your website.

<scripttype="text/javascript">functionsendSMS(form){branch.sendSMS(phone: form.phone.text,{channel:'Website',feature:'Text-Me-The-App',data:{foo:'bar'}},{make_new_link: false},// Default: false. If set to true, sendSMS will generate a new link even if one already exists.function(err){console.log(err);});}</script>

You can create your own custom default message that will be sent if the specific link someone clicks doesn't have a customized message itself. Navigate back to the Desktop SMS page on the Branch dashboard. You should see the following section below.

If you don't want to edit the global SMS text, you can define a special SMS message for each individual link. Whether you want to switch the language of a message for a different region or include device specific date, you can specify the message in the Deep Link Data section at the bottom of the link editing screen.

Use the $custom_sms_text parameter and then enter your custom message in the value section. Make sure to include the {{ link }} tag in your custom message! Read the following scenario below to see this in action.

The developer of FlowerPower wants to customize the SMS messages based on the country of the recipient. For each Branch link, they would specify in the deep link data a different custom message.

You can access almost any value of your link's parameters by using liquid tags. The customization options are only limited to your imagination.

The tag {{ link }} is replaced with your Branch link

{{ link.channel }} and {{ link.campaign }} output the channel and campaign, if these were set when creating the link.

{{ link.data.key }} will output a parameter of your link's data dictionary, where key is the name of the parameter

Here's an example to illustrate this scenario.

Dmitri is creating Branch links to deep link to each of the different flowers in his app FlowerPower. He creates each link with a key/value pair of the key flower and the flower name, e.g. Flower : Rose, Flower : Tulip. He wants to customize his SMS messages based on name of the flower, so he sets his custom link messages as:

The sendSMS() method requires a phone number and link parameters. You may optionally specify configuration options and a callback.

branch.sendSMS(phone,linkData,options,callback(err,data));

Your call to this method, once filled in with the user's phone number, could look like the following:

branch.sendSMS(phone:'9999999999',{tags:['tag1','tag2'],channel:'facebook',feature:'dashboard',stage:'new user',data:{foo:'bar'}},{make_new_link:false},// Default: false. If set to true, sendSMS will generate a new link even if one already exists.function(err){console.log(err);}});

Yes. Branch uses Twilio to send SMS messages, which means SMS will be delivered all around the world. However, please note that the number the SMS has to be delivered to, must be in the same country the SMS is being sent from.

I've sent myself multiple texts just now and only received the first few, what's going on?¶

This occurs when a carrier filters you SMS out due to spam. We try our hardest to rate limit a specific user, however, if bypassed, carriers may block your SMS. The reason is that carriers will aggressively block content if it's similar and repeatedly sent to the same number. The solution is to wait 24-48 hours.

With full numbers, you are required to use "+" and the country code. If you know your users are only in a certain country, you can automatically prepend "+" and the country code so that they only need to enter their regular number. To do this, you must create a custom text-me-the-app page. Then, you can alter the code snippet in step 2 with the following:

varphone="+91"+form.phone.value;

In the example above, "+91" is the code for the country your users are based in.