Send post to WhatsApp Channel
Manage WhatsApp Channels via API
All Channel API Calls to work with WhatsApp channels: https://whapi.readme.io/reference/getnewsletters
Our Cloud API supports WhatsApp Channels, a brand-new feature introduced by WhatsApp. Itβs a unidirectional broadcast tool where administrators can send text, photos, videos, stickers, and polls. And users receive push notifications of updates from the channel like a private message.
To send a message to the channel you need to know the channel ID.
In order to find out the identifier use the following method: GET /newsletters
curl --request GET \
--url 'https://gate.whapi.cloud/newsletters?count=100' \
--header 'accept: application/json' \
--header 'authorization: Bearer iwc4s1vpNBhVbdSPwBczBDVCXo2bBmcs'
The channel ID looks like this: 120363171744447809@newsletter
Once you know the channel ID, you can use the method to send any message. For example, a text message:
In the βtoβ
parameter you insert the ID of the channel ( 120363171744447809@newsletter
) you want to send the message to. And in the βbodyβ,
the text of the message
curl --request POST \
--url https://gate.whapi.cloud/messages/text \
--header 'accept: application/json' \
--header 'authorization: Bearer iwc4s1vpNBhVbdSPwBczBDVCXo2bBmcs' \
--header 'content-type: application/json' \
--data '
{
"to": "120208836317406034@newsletter",
"body": "Hello, World!"
}
'
Last updated
Was this helpful?