The 'Click to Chat' feature from messaging service WhatsApp allows you to start a chat with someone by clicking on a special web link. The documentation from WhatsApp about this is pretty easy to follow, but there are some oddities around the formatting of the link that are worth exploring.
As you might imagine, the 'Click to Chat' link contains within it the phone number associated with the WhatsApp account of the chattee. As WhatsApp says:
To create your own link, use https://wa.me/ where the is a full phone number in international format. Omit any zeroes, brackets or dashes when adding the phone number in international format.
(Obviously when WhatsApp says 'omit any zeroes', it means from the international bit of the number - not from the entire number!)
It then goes on to give the example of https://wa.me/15551234567, which is presumably a US or Canadian number (the country code for both countries being 1).
The first time I added a WhatsApp 'Click to Chat' link to a website, I didn't follow this documentation. The link contained a UK number, and the country code for the UK is 44. But instead of starting the number with 44, I started it with +44. Later, I changed it to 0044. Why did I do this, and did these two number formats work with 'Click to Chat'?
To dial an international number, it's usually necessary to prefix it with what is variously called an 'IDD prefix', 'dial out code', 'exit code' or 'international call prefix'. They are all the same thing, and in the UK this number is 00. So to dial the US from the UK, we would start the call with 00 (the IDD prefix) followed by 1 (the country code).
Many countries, but not all, also us 00 as their IDD prefix. For example, the US has 011 as their IDD prefix instead. But if the prefix varies from country to country, how can we write international numbers in a format that makes sense in every country? The solution is show a plus sign (+) to represent the IDD prefix. So in the UK, the + sign stands for 00, while in the US it stands for 011.
But the plus sign isn't just a placeholder - with modern phones it can actually be used as part of the number you are dialling (in place of the IDD prefix). As Wikepedia says:
Many phones allow the plus sign to be entered in their saved number lists... When making a call, the system then automatically converts the plus sign to the correct international prefix, depending on where the phone is being used, which enables callers to use the same stored number when calling from either their own country or any other.
Going back to my website - I knew that many of the users of the 'Click to Chat' button would be based outside the UK, so I needed to use an international format for the number in the link. I was so used to using +44 to make international calls to the UK that this is what I included in the link.
You may be surprised to learn that clicking a 'Click to Chat' link with a number beginning +44 did work, despite it being counter to WhatsApp's own documentation. However it only worked from the WhatsApp Messenger mobile app (both for iPhone and Android), not from WhatsApp Web or the WhatsApp desktop app. In the latter two cases, WhatsApp itself launched successfully but was unable to recognise and begin a chat with the number.
When I spotted that the link wasn't working properly with WhatsApp Web and the desktop app, I surmised that the + might be causing the problem and changed the format from +44 to 0044.
Using 0044 as the prefix worked in WhatsApp Web and the WhatsApp desktop app, unlike +44. It also worked in the mobile app on iPhone (iOS). However on Android it gave the following error:
"Couldn't look up phone number because it's either missing a country code or has the wrong one"
It is also worth remembering that I am based in the UK myself, where the IDD prefix is 00. I remain to be convinced that this format would work at all (even on iPhone) in countries with a different IDD prefix. As I mentioned, the US has an IDD prefix of 011, so would presumably require the number to start 01144 - in which case the 0044 link would not work. I would be very interested to hear from any US-based readers able to put this to the test.
But I do suspect this is why WhatsApp's preferred format is to drop the IDD prefix entirely and just put the country code. And it is amazing the things you learn when you neglect to read the documentation...
|Mobile - iPhone (from UK)||Y||Y||Y|
|Mobile - Android (from UK)||Y||N||Y|
|WhatsApp Web (from UK)||N||Y||Y|
|Desktop app (from UK)||N||Y||Y|
|From outside UK||?||?||Assume Y|