<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>chat &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/chat/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sat, 19 Apr 2025 07:27:56 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>chat &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Whatever happened to URI Schemes?]]></title>
		<link>https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/</link>
					<comments>https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 19 Apr 2017 11:07:59 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[standards]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=25036</guid>

					<description><![CDATA[A few days ago, I ranted about how chat apps have poor support for URI schemes.  By &#34;Chat Apps&#34;, I&#039;m talking about the new wave of messengers - WhatsApp, WeChat, Telegram, Wire, and the like.  What do I mean by &#34;URI Scheme&#34;?  You&#039;re probably familiar with:   https://example.com   The &#34;scheme&#34; is https - it tells the computer &#34;Open the web browser and load the specified resource.&#34;  You may also be …]]></description>
										<content:encoded><![CDATA[<p>A few days ago, <a href="https://twitter.com/edent/status/851156962641313792">I ranted about how chat apps have poor support for URI schemes</a>.</p>

<p>By "Chat Apps", I'm talking about the new wave of messengers - WhatsApp, WeChat, Telegram, Wire, and the like.</p>

<p>What do I mean by "URI Scheme"?  You're probably familiar with:</p>

<ul>
<li><code>https://example.com</code></li>
</ul>

<p>The "<a href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax">scheme</a>" is <code>https</code> - it tells the computer "Open the web browser and load the specified resource."</p>

<p>You may also be aware of:</p>

<ul>
<li><code>mailto:me@example.com</code></li>
</ul>

<p>This tells the computer to open the email app and fill in "me@example.com" as the destination address.</p>

<p>Also fairly common are:</p>

<ul>
<li><code>tel:+447700900123</code> open the phone dialler and prepare to dial this number.</li>
<li><code>sms:+447700900123</code> open the text message app and use this number.</li>
<li><code>skype:terence.eden</code> open the Skype app and contact the specified user.</li>
</ul>

<p>There are <a href="https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml">hundreds of URI schemes</a> in use.  <a href="http://stackoverflow.com/questions/8464632/what-are-the-uri-url-schemes-for-most-im-networks">Older chat apps like ICQ and AIM made use of schemes</a> - yet <em>modern</em> chat apps mostly ignore them. Why?</p>

<p>At the moment, there's is literally no way I can send you a link which says "This is my account on Wire, chat to me using the app."</p>

<h2 id="uri-support"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#uri-support">URI Support</a></h2>

<p>Firstly, it's not all bad news!  There are a few apps which <em>do</em> have rudimentary URI support.</p>

<h3 id="whatsapp"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#whatsapp">WhatsApp</a></h3>

<p>There is an <em>undocumented</em> URI Scheme:</p>

<ul>
<li><code>whatsapp://send/?phone=447700900123</code></li>
</ul>

<p>In repeated testing with friends, it performed inconsistently. Sometimes it would open a chat window, other times it gave an error.</p>

<h3 id="telegram"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#telegram">Telegram</a></h3>

<p>Again, an <em>undocumented</em> URI Scheme. This is how to look up users by username:</p>

<ul>
<li><code>tg://resolve?domain=edent</code></li>
</ul>

<p>In tests it worked reliably across all platforms.</p>

<h3 id="wechat"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#wechat">WeChat</a></h3>

<p>The popular Chinese messenger has the bare minimum of a scheme:</p>

<ul>
<li><code>weixin://</code></li>
</ul>

<p>That will launch the app, if installed. That's it. There's no way to target a specific user.</p>

<h2 id="when-it-all-goes-wrong"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#when-it-all-goes-wrong">When it all goes wrong</a></h2>

<p>We take it for granted that everyone who clicks on a link has a web browser and email client installed. If they're on mobile, they probably have the ability to make phone calls and send SMS.</p>

<p>So what happens if you don't have a chat app installed?  This hot mess:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2017/04/tg.png" alt="A web browser showing an error message that it didn't understand a protocol" width="366" height="431" class="aligncenter size-full wp-image-25045">

<p>It's pretty much the same on Android or iPhone - the user is sent to an unhelpful error page.</p>

<h2 id="why-not-use-an-http-resolver"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#why-not-use-an-http-resolver">Why not use an HTTP resolver?</a></h2>

<p>Both Telegram &amp; WhatsApp let you look up a user on their website and then redirect you to the app.</p>

<ul>
<li><a href="https://t.me/edent"><code>https://t.me/edent</code></a></li>
<li><a href="https://api.whatsapp.com/send?phone=447700900123"><code>https://api.whatsapp.com/send?phone=447700900123</code></a></li>
</ul>

<p>If you open that in your browser, it will take you to the provider's site and they will then redirect you to their app.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2017/04/telegram-fs8.png" alt="The telgram website attempts to redirect the user to the app" width="320" height="320" class="aligncenter size-full wp-image-25047">

<p>This introduces a number of problems.</p>

<ul>
<li>An extra step which adds latency.

<ul>
<li>It forces everything through the browser - so you have to wait for that to load, resolve, and close before you can chat.</li>
</ul></li>
<li>Leaks metadata.

<ul>
<li>Your ISP now knows that you're doing a lookup.</li>
</ul></li>
<li>Increases vendor lock in.

<ul>
<li>What if Telegram decides that it will only allow lookups from registered users?</li>
</ul></li>
<li>Security

<ul>
<li>What if Telegram lies about the resolved account?</li>
</ul></li>
<li>It doesn't actually work

<ul>
<li>There's no way for a website to tell if the user has an app installed.</li>
<li>The user is often redirected to a URI they can't open.</li>
</ul></li>
</ul>

<p>For now, it seems that using an HTTP resolver is the least worst option. It can easily be shared and understood by users - and it doesn't tie the receiver in to a specific technology like Android Intents.</p>

<p>But, for the future - perhaps there's a better way?</p>

<h2 id="federation"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#federation">Federation</a></h2>

<p>Given that WhatsApp, Wire, Allo, Facebook and many others <a href="https://en.wikipedia.org/wiki/Signal_Protocol">all use the Open Whisper Systems protocol</a>, it seem bizarre to me that they can't communicate with each other.  Imagine if your iPhone couldn't make calls to your friend's Nokia - unacceptable!</p>

<p>Similarly, all the major voice/video calling apps are converging on WebRTC to pipe your call around the world.  The app is <em>merely</em> the user interface.  You may prefer to use OutLook, I prefer Gmail - but they both use email as the underlying communications platform.</p>

<p>I've explained before why <a href="https://shkspr.mobi/blog/2017/02/can-i-own-my-identity-on-the-internet/">using a mobile phone number is a poor choice of identifier</a> (mostly because the user doesn't own it and can't transfer it overseas) - but given that's what most people use now, it makes sense to include it as an option.</p>

<h2 id="problem-statement"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#problem-statement">Problem Statement</a></h2>

<p>I want to share a link with someone so they can talk to me on my preferred chat app.</p>

<h2 id="solution"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#solution">Solution</a></h2>

<p>Let's create a new URI scheme - <code>chat:</code></p>

<p>It is short and it doesn't tie itself to a specific action (<code>videocall:</code>, <code>text:</code>, <code>voice:</code>), or to a specific protocol (Signal, WebRTC).</p>

<p>When clicking on a <code>chat:</code> link, your device will either:</p>

<ul>
<li>Open up your chat client.</li>
<li>If you have several installed, give you a choice of chat client.</li>
</ul>

<p>Let's take a look at some examples:</p>

<h3 id="just-a-phone-number"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#just-a-phone-number">Just a phone number</a></h3>

<p><code>chat:+447700900123</code></p>

<ul>
<li>An internationally formatted <a href="https://en.wikipedia.org/wiki/E.164">E.164</a> phone number.</li>
<li>The <code>+CountryCode</code> at the start is mandatory.</li>
<li>This is to disambiguate between users with similar numbers but provided by different countries.</li>
</ul>

<p>This assumes that both parties are on the same chat app.</p>

<p>If I'm on WhatsApp and my friend only has WeChat installed - what happens?  Well, part of Federation means that you can talk <em>across</em> different chat apps.</p>

<h3 id="named-account-at-a-provider"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#named-account-at-a-provider">Named account at a provider</a></h3>

<p><code>chat:me@example.com</code></p>

<ul>
<li>This will open the "example.com" chat app.</li>
<li>Possible confusion with an email address (see later)?</li>
<li>Might be more sensible to use <code>account@com.example</code>? But users are unlikely to understand that.</li>
<li>It could be <code>chat:@shkspr.mobi</code> and let my domain manage where I want the chat to be directed.</li>
<li>Could just use "me@whatsapp" - does a hierarchy need to be imposed?</li>
</ul>

<h3 id="a-name-can-also-be-a-number"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#a-name-can-also-be-a-number">A name can also be a number</a></h3>

<p><code>chat:+447700900123@whatsapp</code></p>

<h3 id="with-specific-actions"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#with-specific-actions">With specific actions</a></h3>

<p><code>chat:me@example.com?body=URL%20Encoded%20String</code></p>

<ul>
<li>This pre-fills a message to be sent to the specific user.</li>
<li>Identical syntax to email's <code>mailto:</code></li>
<li>Could also include base64 encoded data for images and other attachments.</li>
</ul>

<h3 id="with-multiple-participants"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#with-multiple-participants">With multiple participants</a></h3>

<p><code>chat:me@example.com,+447700900123,alice@example.org</code></p>

<ul>
<li>Start a chat with several participants.</li>
<li>Again, identical to email's <code>mailto</code> syntax.</li>
<li>Could also be combined with the <code>?body=</code> above.</li>
</ul>

<h3 id="ephemeral-support"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#ephemeral-support">Ephemeral Support</a></h3>

<p><code>chat:me@example.com?timeout=60&amp;body=This message will self destruct</code></p>

<ul>
<li>Requests that the receiving client will discard the message after a <code>timeout</code> specified in seconds.</li>
<li>It is up to the receiver to comply with this request.</li>
</ul>

<h2 id="and-then"><a href="https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/#and-then">And Then...</a></h2>

<p>Are URI Schemes the future once more? I think they have to be.  Messaging app providers will shut down (MySpace), people will migrate away from platforms (ICQ), phone numbers and email addresses will change - but people will still want to chat with the minimum of fuss.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=25036&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2017/04/whatever-happened-to-uri-schemes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
