Send Messages via What’s App API

Ever received a spoof What’s App message, or invite to a What’s App Group?

It is because there is a What’s App API that allows anybody to automate the process of sending messages to an individual or group.

How to send message via What’s App API

Requirements

    • Have a WhatsApp number already linked to the platform and online.
    • Group WhatsApp ID (WID) that you can find in two ways:

How to obtain the Group WhatsApp ID

You can obtain the Group WhatsApp ID by using one of these methods:

    1. Web: go to number’s settings > Groups > Copy the Group WID.
    2. API: query the available groups in your number using this endpoint.

API endpoint

We will use the following API endpoint to send messages to a group:

Prepare the request

Target API URL using the POST method

https://api.wassenger.com/v1/messages

Required HTTPS headers > Obtain your API key here

Content-Type: application/json
Token: $API_TOKEN

Use body in JSON format

{
  "group": "$GROUP_WID@g.us",
  "message": "This is a sample message sent to a group"
}