Learn to call the WhatsApp Business Cloud API from Postman in Part 2 of our WhatsApp ChatGPT Bot series. Step-by-step guide to enhance your chatbot development.
Introduction
In Part 2 of our WhatsApp ChatGPT Bot series, we’ll delve into calling the WhatsApp Business Cloud API using Postman. This step-by-step guide will help you enhance your chatbot development skills, ensuring seamless integration and communication with WhatsApp. Whether you’re a developer aiming to refine your API interaction or a business owner looking to optimize customer engagement, this tutorial is designed to provide you with practical insights and hands-on experience. Let’s continue building your WhatsApp ChatGPT Bot and take it to the next level!
You can find all the parts for this series at WhatsApp ChatGPT using .NET C# | Beginner Friendly Series.
Prerequisites
Before starting with Part 2, ensure you have the following prerequisites in place:
- Completion of Part 1: Complete the steps in Part 1 to set up your WhatsApp Business app and send your first message.
- Meta Developer Account: Sign up for a Meta Developer account and have your WhatsApp Business app set up.
- Postman Installed: Download and install Postman on your system.
- WhatsApp Business Cloud API Access: Ensure you have access to the WhatsApp Business Cloud API.
- API Credentials: Have your API key, phone number ID, and WhatsApp Business account ID ready.
- Basic Understanding of APIs: Familiarity with API requests and responses.
Complete Video Tutorial
Step 1: Open up your Existing App
Go to Meta for Developers. Click on “My Apps”.

Open your existing app that we created in our last blog, named “MyFirstWAApp”.

On the left sidebar, under “WhatsApp,” click on “API Setup.”

Step 2: Setup the API
Select your “from” and “to” phone numbers and prepare the CURL operation.

Step 3: Calling WhatsApp Business Cloud API from Postman to Send a Text Message
- Open Postman: Launch Postman on your system.
- Create a New Request: Click on “New” and select “Request.”
- Set Request Type: Set the request type to “POST.”
- Enter the URI: Copy the URI from the API Setup page and paste it into the request URL field in Postman.
https://graph.facebook.com/v19.0/YOUR_PHONE_NUMBER_ID/messages
- Add Headers:
- Authorization: Set to
Bearer YOUR_ACCESS_TOKEN - Content-Type: Set to
application/json
- Set the Request Body:
- Choose “raw” and set the format to JSON.
- Copy the JSON body from the API Setup page and paste it into the request body field. It should look something like this:
{
"messaging_product": "whatsapp",
"to": "RECIPIENT_PHONE_NUMBER",
"type": "text",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}
- Send the Request: Click “Send” to execute the request and send the message.
Below is what your request looks like:
- Request Type: POST
- URI:
https://graph.facebook.com/v13.0/YOUR_PHONE_NUMBER_ID/messages - Headers:
Authorization: Bearer YOUR_ACCESS_TOKENContent-Type: application/json- Request Body:
{
"messaging_product": "whatsapp",
"to": "RECIPIENT_PHONE_NUMBER",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}

Send the request, and below is what the response looks like:

Check your WhatsApp to see if you received the message.

Conclusion
That’s it! You’ve successfully called the WhatsApp Business Cloud API from Postman to send your first WhatsApp message.


Leave a Reply