Skip to content

QR Codes for calling and texting

β€’ ~1 min read β€’ Updated

I’m obsessed with QR codes. I don’t know why I’m like this. I just love the fact that they can be printed on paper to encode information in a way that doesn’t require any power and can be read by any phone.

I was talking to a co-worker today about them, and had the idea of using a tel: link in a QR code for someone to be able to call you, and it turns out that works!

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/shoelace.js"
></script>
<sl-qr-code
  value="tel:+17192662837"
  label="Scan to call Callin' Oates, your emergency Hall & Oates helpline"
></sl-qr-code>

This also got me wondering if it could similarly be done for texting instead of calling, and it CAN! Just swap tel: for sms:! You can even add a ?body parameter to pre-populate the message. From my super cursory testing, this seems to work on both iOS and Android!

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/shoelace.js"
></script>
<sl-qr-code
  value="sms:+15550001111?body=Hello%20there!"
  label="Scan to text 'Hello there!' to +1 (555) 000-1111"
></sl-qr-code>

Share this post

πŸ“§ Email