How to check if a phone number is on WhatsApp via Twilio API
I'm trying to find a way to check if a phone number is on whatsapp or not. We're using the Twilio API and have a verified Whatsapp business account.
This was not possible in 2019, but maybe something's changed?
Thank you
Are you trying to check if your Twilio numbers have WhatsApp capabilities? Or are you trying to check if your user's phone number is also on WhatsApp? Either way, the answer is that you cannot.
I will also note, if you are trying to see if your user's phone number is also WhatsApp capable, that you should find that out from a user when they enter it, because WhatsApp requires explicit opt-in from your user before you can send them messages.
we have an explicit opt-in which allows us to message them, but it's either SMS or whatsapp. The business case: school asks permission to notify about upcoming lessons. student says yes. We either SMS or send via whatsapp, preferably whatsapp because they can click the zoom link.
Oh, then you should ask the user at that opt-in time whether they want to be contacted via WhatsApp or SMS.
you can get different number for WhatsApp related messages and only way to figure out is send them a message and wait for response.