...
Code Block |
---|
{ "project": "{{projectID}}", "msg": "Hi, I'm a test", "channel": "{{channel}}", "to": "{{to}}", "from": "{{from}}" } |
msgType: Different providers allow us to send different message types (text, images, sound, templates…). Most of the projects use Meta and have their own API. We try to use the same types as Meta to avoid misspellings and mistakes.
Our current message types are: image | template | text | quick-replies. ‘text’ is the default type.
Example to send WhatsApp message with quick replies (previously, you need to start the conversation):
Code Block |
---|
{
"project": "{{project}}",
"msg": "More info: https://developers.facebook.com/docs/whatsapp/cloud-api/messages/interactive-reply-buttons-messages/",
"channel": "whatsapp",
"to": "{{phone}}",
"lang": "en",
"msgType": "quick-replies",
"extraParams": {
"header": {
"type": "text",
"text": "You can remove this. This is a mega title"
},
"action": {
"buttons": [
{
"type": "reply",
"reply": {
"id": "sad",
"title": "Sad"
}
},
{
"type": "reply",
"reply": {
"id": "happy",
"title": "Fine"
}
}
]
},
"footer": "You can remove this if you are not using it."
}
} |
the client will see:
This is an example to send an image:
Code Block |
---|
{
"project": "TEST-FB",
"msgType": "image",
"msg": "https://www.psi.or.tz/images/logo_psi.png",
"channel": "facebook",
"to": "{{fb-psid}}",
} |
⚠️ Before starting to use this service in a project, you need to communicate with the service admin to update the configuration.
...