Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send messages to Whatsapp number using PHP

I have to send messages to the customer's whatsapp number programatically.

What are the pre requirements/needs?

Do I need to convert/register my personal number to business account?

Is there any API provided by whatsapp for this?

like image 585
Deepu Sasidharan Avatar asked Jan 19 '18 04:01

Deepu Sasidharan


People also ask

How can I send message to WhatsApp API?

Install the WhatsApp Business API Client — Install your API client. Once your client is working, you can update your application settings. Start using the client — Register your phone number with an API call to /account and send a test message with a call to /messages .

Is WhatsApp API free?

WhatsApp is introducing free cloud-based API services in a push to get more businesses using the app, Meta Platforms CEO Mark Zuckerberg announced at the company's messaging event on Thursday.


2 Answers

WhatsApp just launched business api recently

What are the pre requirements/needs?

Please submit a form at https://www.facebook.com/business/m/whatsapp/business-api to sign up

Do I need to convert/register my personal number to business account?

You need to register a phone number as business account, after registration, you cannot use whatsapp app with the same number on your device. So it's better to register business account with another number rather than your personal number

Is there any API provided by whatsapp for this?

Please check out https://www.whatsapp.com/business/api for more information

like image 145
Weiyan Wang Avatar answered Oct 17 '22 19:10

Weiyan Wang


Do I need to convert/register my personal number to business account?

Not necessarily, it's your choice if you want to share your personal account, even though you recommend using a business account

Is there any API provided by whatsapp for this?

According to Whatsapp's own documentation, they do not have a direct API, but you can create a link to send the messages, according to the documentation, follow the submission parameter by the URL: https://api.whatsapp.com/send?phone=

Here's another example:

Use: https://api.whatsapp.com/send?phone=15551234567

Don't use: https://api.whatsapp.com/send?phone=+001-(555)1234567

You can see more in: https://faq.whatsapp.com/en/android/26000030/


UPDATE APRIL, 24 2022

Whatsapp sender API url has been changed to: https://wa.me/<number>

Example:

Use: https://wa.me/1XXXXXXXXXX

Don't use: https://wa.me/+001-(XXX)XXXXXXX

like image 10
Jessé Lopes Pereira Avatar answered Oct 17 '22 18:10

Jessé Lopes Pereira