How to Send Messages Via API For your Official WhatsApp Number ( Postman ) ?
Sending Template Messages via API
Navigate to the templates section and click on the template icon.
Note the unique JSON for each template. Templates can include variables, image headers, and buttons.
For templates with image headers
Provide the image URL in the
link
variable and input the body variables.
Copy the JSON body and open a new call in Postman.
In Postman, add the copied JSON body to the Body section, set to raw and choose JSON.
Edit the
receiver number
to include the country code and adjust the variable text as needed. Remember, variables cannot have next lines.Change the authorization method to Bearer Token and insert your access token.
Set the request type to POST.
Copy and paste the API URL, API URL version, phone number ID, and messages into the appropriate fields.
Send the message. Upon a successful request, you'll receive a Queue ID.
Set the webhook URL of your server to handle responses.
API responses from Meta will be directed to your specified webhook URL.
Responses may include a success message with a WhatsApp message ID or a failure message with an error code.
A success response indicates the token was valid and the message has been sent By Meta.
To get API Key, API Url, version and phone number Id: Go to "Channels">Click on the 3 dots>Select "Access token".
Postman Documentation -
Video Tutorial -
Last updated