
The Twilio API for WhatsApp - coloneltcb
https://www.twilio.com/blog/2018/08/twilio-whatsapp-api.html
======
_wmd
Back when I was a WhatsApp user, I for one enjoyed the refreshing total
absence of notification spam. If I got a ping, it was because a real person I
know had something to say. Just a cold, focused person-person messaging app.
Even Facebook could not top that

Opening the floodgates to cron jobs dilutes the value of the service for me,
and forces WhatsApp down my list of priorities along with SMS - which I
haven't had notifications enabled for in many years, because in almost every
case the messages are effectively an abuse of time and attention.

~~~
gregorymichael
Greg from Twilio here.

Totally understand your concern -- no one wants more spam. WhatsApp currently
requires that brands using this API collect explicit opt-in from users prior
to messaging them, and also that they also use pre-approved message templates
to reach out to customers. Free-form messages can only be sent if the user
replies back, and then only for 24 hours.

Curious, why'd you stop using WhatsApp?

~~~
zamalek
> Curious, why'd you stop using WhatsApp?

I assume Facebook. I'm trying to get everyone I know off of it for that
reason. Have you considered Signal or Telegram as additional integrations?

~~~
bigiain
I share _wmd's concerns here. The _last_ thing I want is to be "contacted by
brands" on Signal. And while I know I can manage _my_ experience with Signal,
I don't want Signal to become a place where my friends avoid because it turns
into a cesspit of "brand engagement" like so many other services...

(Which sucks a bit for WhisperSystems since I'm not paying them, and I don't
want them to take money off Pepsi/TMobile/McDonalds in return for "access to
me" either...)

~~~
zamalek
Very good point. I haven't actually used WeChat, but so far as I know you have
to explicitly opt-in by adding the brand as a contact. There are valid non-
spam use-cases (e.g. Amazon order updates) and it would be an unobtrusive
monetization strategy.

------
yumaikas
> Users increasingly want to talk to businesses the same way they talk with
> their friends and family.

Citation needed, IMO. I hardly speak for most users, but if I had to guess,
it's far more that businesses want to speak to users the same way that users
talk to their friends and family, rather than the other way around.

Not that this doesn't sound pretty neat, but I'm super curious where the
demand from users to connect with businesses via WhatsApp is.

~~~
gregorymichael
Greg from Twilio here.

Living in America and not being a regular WhatsApp user, I had a similar
reaction when I first heard about this. It wasn’t until I started talking to
developers outside America -- especially in Brazil and India, areas where SMS
is unreliable and expensive, and where WhatsApp is ubiquitous -- that I
realized how powerful this product could actually be.

~~~
yumaikas
Thanks for explaining that.

------
astatine
Interesting business model indeed if this article
[https://techcrunch.com/2018/08/01/whatsapp-business-
api/](https://techcrunch.com/2018/08/01/whatsapp-business-api/) is to be
believed. Though the part of a business only being able to respond to customer
initiated messages doesn't seem right - I, even now, get WhatsApp messages
from bookmyshow and makemytrip (movie and travel booking portals in India) for
bookings done, without me ever sending them a WhatsApp message. They were a
part of the early adopter program. And the Twilio API also offers to send
unsolicited messages for a fee ($0.0075 it looks like).

~~~
pdesh08
Pranav from Twilio here. You're right — businesses can contact users first,
provided they only use message templates pre-approved by WhatsApp.The article
gets that wrong. The messages MMT or BMS have sent you so far should be
according to these templates. Also, businesses can not send unsolicited
messages though - users have to opt-in to receiving messages from them. You
probably did that when you gave them your WhatsApp number after buying a
ticket or a flight.

~~~
function_seven
How is the opt-in requirement enforced in the API? Some sort of ticket or per-
user authorization hash?

------
thebigspacefuck
Is this against Facebook/WhatsApp's policy to use this as a business?

From:
[https://developers.facebook.com/docs/whatsapp/overview](https://developers.facebook.com/docs/whatsapp/overview)

"Please note that if you use anything other than the official WhatsApp
Business API or other official WhatsApp tools, we reserve the right to limit
or remove your access to WhatsApp as this violates our policies. Please do not
use any non-WhatsApp authorized third-party tools to communicate on WhatsApp."

~~~
philtar
This changed 24 hours ago.

~~~
thebigspacefuck
They just added that language 24 hours ago?

------
jcampbell1
As a digital nomad that swaps sim cards for cheap data, this is good news. I
hope most business adopt a WhatsApp option. IME most developing nations have
10+Mbps LTE for $3 GB and useless wifi. International roaming is crap because
you need to be on the right network depending on the town.

~~~
StudentStuff
Why not just get a VOIP OTT app so you have a stable phone number to be
reached at?

~~~
philg_jr
still would need to swap sim cards for different providers as you nomad
around.

~~~
toomuchtodo
Hopefully this becomes unnecessary in a few years as the eSIM standard moves
along, and your SIM is virtual (and multiple operator "SIMs" can be
provisioned on a device).

[https://www.gsma.com/esim/](https://www.gsma.com/esim/)

~~~
xur17
I am really looking forward to prepaid providers offering this. Recently when
I was in Canada for a few days, and was stuck on a slow international data
plan through TMobile, I would have paid $10 or $20 for an eSIM if it was as
easy as downloading an app.

------
asadlionpk
WhatsApp has a public API? Or is this a partnership?

~~~
polote
Whatsapp is currently opening API to few partners

[https://blog.whatsapp.com/10000648/Growing-our-Tools-for-
Bus...](https://blog.whatsapp.com/10000648/Growing-our-Tools-for-Business)

------
flibble
Your pricing is fu*ked. >9c to Germany, >7c to Ireland, > 8c to France, nearly
10c to Netherlands. More expensive than SMS.

------
jpeeler
I can't take my eyes off the rotating 3d code gif and am wondering how
something like that was made.

~~~
gregorymichael
Greg from Twilio here.

We are fortunate to have a guy on our Brand team, Aaron, who is very good with
video.

------
wiradikusuma
I'm really hoping that WhatsApp would open their (chatbot) API to devs soon,
following Facebook Messenger, Telegram, LINE, Kik, etc.

This Twilio API for WhatsApp is more suitable for s/spammers/marketers,
because it will be prohibitively expensive for casual chat.

------
rsync
Can I access whatsapp messaging from a twiml bin, or do I have to host a
script on a third party somewhere ?

I really, really like using twiml bins because no third party or hosting is
required - the code resides on, and runs on, twilio ...

~~~
gregorymichael
You can use TwiML Bins! Also, have you tried Functions? It's like TwiML Bins,
but with more JavaScript.

[https://www.twilio.com/console/runtime/functions/](https://www.twilio.com/console/runtime/functions/)

~~~
cphoover
(aws lambdas with twilio sdk baked in)

------
tnolet
I guess AWS will be next. Would be great to have as an SNS destination.

------
pbiggar
Smart. I'm amazed that there isn't one for iMessage as well. Most of the world
has replaced SMS with either iMessage or Whatsapp, would be great to have
both.

~~~
firloop
I wouldn't be surprised if Twilio gets into this soon as well, since Apple is
opening up the iMessage platform.

[https://www.apple.com/ios/business-chat/](https://www.apple.com/ios/business-
chat/)

~~~
Nightshaxx
Damn that's actually pretty interesting.

------
walski
Can business accounts on WhatsApp be part of groups?

~~~
gregorymichael
Greg from Twilio here.

The API doesn't currently support groups. It's a big feature request though.

------
StavrosK
Why is this priced the same as SMS? How does WhatsApp allow it? Why does it
only allow Twilio? Is there an API I can connect to directly?

~~~
TYPE_FASTER
[https://blog.whatsapp.com/10000648/Growing-our-Tools-for-
Bus...](https://blog.whatsapp.com/10000648/Growing-our-Tools-for-Business)

------
CiPHPerCoder
Does Twilio handle the end-to-end encryption on behalf of its users? If so,
they can still be intercepted or modified at the API level.

~~~
gregorymichael
Greg from Twilio here.

This is a great question, and we can do a better job describing what’s
happening here.

Messages are encrypted between your users and Twilio using WhatsApp’s end-to-
end encryption. Your requests to Twilio are secure with our HTTPS REST API.
You can also redact your messages on Twilio for even greater privacy.

Appreciate you highlighting this. We’re working on getting the copy updated on
our website to be more clear.

------
Orlan
Is this for businesses only, or can individuals with a Twilio account also
make use of this API?

~~~
gregorymichael
Greg from Twilio here.

Right now it's for businesses only. Any developer can use Twilio's sandbox,
but to ship to production you'll need a verified WhatsApp Business account.

------
segmondy
How much will it cost? It needs to be much cheaper than SMS. SMS adds up fast.

~~~
Jtsummers
[https://www.twilio.com/whatsapp/pricing/us](https://www.twilio.com/whatsapp/pricing/us)

Looks like it'll also add up fast.

~~~
sgt
$0.0135 per message. That's almost like SMS, to be honest.

~~~
Operyl
But extremely cheap compared to the markets they're targeting. SMS is
expensive in countries outside of the US, and that's why WhatsApp is so widely
used.

~~~
thebigspacefuck
Is it cheaper than the same functionality in WhatsApp's business API?

[https://developers.facebook.com/docs/whatsapp/api/messages](https://developers.facebook.com/docs/whatsapp/api/messages)

~~~
Operyl
Unknown, it's not currently public pricing afaict. Probably behind an NDA or
variable,

------
alexcnwy
Any word on pricing?

------
zhovner
Whatsapp is so ugly and stupid messenger:

1\. Desktop client is a proxy for mobile app. If phone goes offline, desktop
client is disconnect.

2\. You can't add contact from desktop client. So if you use whatsapp for
business, you need a phone right right next to desktop PC and every time
switching between phone and desktop.

3\. Only local contact list and only one device. If we have few managers that
uses WhatsApp for sales or tech support, we can't share one account for few
PC's.

4\. Impossible to logout from mobile app. To logout on iOS you need to delete
WhatsApp and then install it again.

5\. No chat logs on the server. You need to backup your chat's INTO THE FILE
and then move it to another device.

6\. Only one device! You can't simultaneously use whatsapp on phone and
tablet.

I can continue this list very long. So I do not understand why this crap is so
popular?

~~~
diegorbaquero
Popularity, if all your family and friends have it, it's hard to move all that
to a new platform.

------
flankstaek
[Removed]

~~~
andrewtorkbaker
Hey there - I lead Twilio's documentation team. There's nothing worse than
frustrating docs, I'm sorry ours are coming up short for you.

I'd love to talk more about it and hear how we can serve you better. And it
looks like you work with Django a lot? So do I - maybe I can help if you've
got a specific project in mind.

My email is abaker@twilio.com - would love to talk more about all of this.

