Deep linking on OpenPhone: How does it work?

Do you offer a mobile app to your customers? Want to give them the option to easily call or text via OpenPhone right from your app? Deep links can help.

What's deep linking?

Deep links are the types of links that send users directly to specific in-app locations, saving users the time spent locating particular pages themselves.

Say you want to allow your users to navigate from your internal app to make a phone call or send a text message via OpenPhone. Here we'll share how to make it possible and how to set up deep links.

⭐️ Note: Deep linking is currently available in mobile apps at this time so you won't be able to add deep links to a web or desktop app.

Who uses deep linking

If you have any sort of mobile app with a communication component to it, your engineering team may want to add deep linking.

Dialing a phone number

openphone://dial?number=<number>&from=<from>&action=call

<number> - required parameter. A URL-encoded phone number string.

<from> - optional. A URL-encoded OP phone number string. If not specified, the currently selected OP number is used

<action> - optional. Currently supports one value: call. When specified, starts the call automatically. If multiple OP numbers are available, it is recommended to also specify <from>, otherwise, the app would explicitly ask to choose the OP number before automatic calling.

Examples for formats "4107934326" and "+14107934326":

openphone://dial?number=4107934326
openphone://dial?number=%2B14107934326

Example with automatic calling:

openphone://dial?number=4107934326&from=3239991234&action=call

Drafting a message

openphone://message?number=<number>&from=<from>&text=<text>&attachments=<url1>,<url2>

<number> - optional. A URL-encoded phone number string.

<from> - optional. A URL-encoded OP phone number string. If not specified, behavior is defined with <selectedAsFallback>.

<selectedAsFallback> - optional, default false. Only used when <from> isn’t set. When true the currently selected OP number is used. When false the app shows a phone number selector.

<text> - optional. A URL-encoded message body

<attachments> - optional. One or more URL-encoded URLs to files on the web, separated with a comma. URLs should terminate with a concrete file extension, such as ".jpg" or ".pdf".

Example 1:

openphone://message?text=Hello,%20buddy

Example 2:

openphone://message?number=4107934326&text=Hello,%20buddy&attachments=https%3A%2F%2Fwww.w3.org%2FWAI%2FER%2Ftests%2Fxhtml%2Ftestfiles%2Fresources%2Fpdf%2Fdummy.pdf,https%3A%2F%2Fopstatics-dev.s3.amazonaws.com%2Fi%2F66f0a31f-b056-491a-a716-06ecfb54af98.png

Group messaging and calling from the deeplink

Group calling release will introduce a functional extension for the dial and message, providing the ability to dial or message multiple numbers from a deeplink.

The number parameter can be a single number as before, or a , separated list of numbers, for example:

openphone://message?number=4107934326,9801235640&text=Hello

openphone://dial?number=4107934326,9801235640&action=call

The maximum number of the phone numbers in the list is 9, which is the current max for the group messaging (the user is the 10th party in such a case).

The phone number can also be a user's direct number, which usually starts with @, but in the URL-encoded format. That is @9997934326 should be listed as %409997934326

⭐️ Note: the dial link expects action=call to be present if multiple numbers are provided.

What happens if your customers click on a deep link

If your customer taps on a phone number in your app, the OpenPhone mobile app will launch and give them the option to dial the number. If they don't have the OpenPhone app installed, they will be taken to the App Store or Google Play Store to download it.