Message using WhatsApp

Hello experts,

I have a client that wishes to use whatsapp messages when certain alarms are active.
Now I know there is an SMS module but i’m wondering if it’s possible to use whatsapp?
If you guys have any other suggestions that would be perfect aswell!
Clients just wants the messages on his phone during certain hours to certain groups of people. (Reception in the building isn’t always perfect but wifi is covered)

Thanks in advance!

Likely need a 3rd party API. Sendgrid.com do SMS, not sure about WhatsApp

Has a lot of work but it is not impossible. https://developers.facebook.com/docs/whatsapp/getting-started/

1 Like

use this for whatsapp integration. for this you need to configure the whatsapp properly in facebook developer account.

def sendmsg():
	#Set the endpoint URL
	url = "https://graph.facebook.com/v15.0/<your_app_id>/messages"
	#Declare a variable and set the parameters for the endpoint URL
	#Instead of specifying the API call parameters for the endpoint URL in the beginning,
	params= {
		"messaging_product": "whatsapp",
		"to": "<phone_number>",
		"type": "template",
		"template": {
			"name": "sample_issue_resolution",
			"language": {
				"code": "en_US"
			},
			"components": [
					            {
					                "type" : "body",
					                "parameters": [
					                    {
					                        "type": "text",
					                        "text": "<Name> - message from Ignition"
					                    }
									]
								}
						]
					}
			}
	header={"Content-Type": "application/json", "Authorization":"Bearer <your token>"}
	response=system.net.httpClient().post(url=url, data=params, headers=header).json
	#system.net.httpClient(version)
	#Print the output
	print (response)