Messages
Inbound simulation (interactive)
Simulate an inbound WhatsApp interactive / button message webhook payload.
POST
/
whatsapp
/
{botnumber}
/
{examid}
Button message
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": { "name": "<UserName>" },
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}curl --request POST \
--url https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": {
"name": "<UserName>"
},
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}
'import requests
url = "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}"
payload = {
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": { "name": "<UserName>" },
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
object: 'whatsapp_business_account',
entry: [
{
id: '161618777036641',
changes: [
{
value: {
messaging_product: 'whatsapp',
metadata: {
display_phone_number: '<botNumberWithISDCode>',
phone_number_id: '119902481216034'
},
contacts: [
{
profile: {name: '<UserName>'},
wa_id: '<user_number>',
user_id: 'IN.2780552728987100'
}
],
messages: [
{
from: '<user_number>',
timestamp: '1778214556',
type: 'button',
button: {payload: 'My application status', text: 'My application status'}
}
]
},
field: 'messages'
}
]
}
]
})
};
fetch('https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'object' => 'whatsapp_business_account',
'entry' => [
[
'id' => '161618777036641',
'changes' => [
[
'value' => [
'messaging_product' => 'whatsapp',
'metadata' => [
'display_phone_number' => '<botNumberWithISDCode>',
'phone_number_id' => '119902481216034'
],
'contacts' => [
[
'profile' => [
'name' => '<UserName>'
],
'wa_id' => '<user_number>',
'user_id' => 'IN.2780552728987100'
]
],
'messages' => [
[
'from' => '<user_number>',
'timestamp' => '1778214556',
'type' => 'button',
'button' => [
'payload' => 'My application status',
'text' => 'My application status'
]
]
]
],
'field' => 'messages'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}"
payload := strings.NewReader("{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "ok"
}⌘I
Button message
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": { "name": "<UserName>" },
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}curl --request POST \
--url https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": {
"name": "<UserName>"
},
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}
'import requests
url = "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}"
payload = {
"object": "whatsapp_business_account",
"entry": [
{
"id": "161618777036641",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<botNumberWithISDCode>",
"phone_number_id": "119902481216034"
},
"contacts": [
{
"profile": { "name": "<UserName>" },
"wa_id": "<user_number>",
"user_id": "IN.2780552728987100"
}
],
"messages": [
{
"from": "<user_number>",
"timestamp": "1778214556",
"type": "button",
"button": {
"payload": "My application status",
"text": "My application status"
}
}
]
},
"field": "messages"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
object: 'whatsapp_business_account',
entry: [
{
id: '161618777036641',
changes: [
{
value: {
messaging_product: 'whatsapp',
metadata: {
display_phone_number: '<botNumberWithISDCode>',
phone_number_id: '119902481216034'
},
contacts: [
{
profile: {name: '<UserName>'},
wa_id: '<user_number>',
user_id: 'IN.2780552728987100'
}
],
messages: [
{
from: '<user_number>',
timestamp: '1778214556',
type: 'button',
button: {payload: 'My application status', text: 'My application status'}
}
]
},
field: 'messages'
}
]
}
]
})
};
fetch('https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'object' => 'whatsapp_business_account',
'entry' => [
[
'id' => '161618777036641',
'changes' => [
[
'value' => [
'messaging_product' => 'whatsapp',
'metadata' => [
'display_phone_number' => '<botNumberWithISDCode>',
'phone_number_id' => '119902481216034'
],
'contacts' => [
[
'profile' => [
'name' => '<UserName>'
],
'wa_id' => '<user_number>',
'user_id' => 'IN.2780552728987100'
]
],
'messages' => [
[
'from' => '<user_number>',
'timestamp' => '1778214556',
'type' => 'button',
'button' => [
'payload' => 'My application status',
'text' => 'My application status'
]
]
]
],
'field' => 'messages'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}"
payload := strings.NewReader("{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://domain-c.neuroncx.in/whatsapp/{botnumber}/{examid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"object\": \"whatsapp_business_account\",\n \"entry\": [\n {\n \"id\": \"161618777036641\",\n \"changes\": [\n {\n \"value\": {\n \"messaging_product\": \"whatsapp\",\n \"metadata\": {\n \"display_phone_number\": \"<botNumberWithISDCode>\",\n \"phone_number_id\": \"119902481216034\"\n },\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"<UserName>\"\n },\n \"wa_id\": \"<user_number>\",\n \"user_id\": \"IN.2780552728987100\"\n }\n ],\n \"messages\": [\n {\n \"from\": \"<user_number>\",\n \"timestamp\": \"1778214556\",\n \"type\": \"button\",\n \"button\": {\n \"payload\": \"My application status\",\n \"text\": \"My application status\"\n }\n }\n ]\n },\n \"field\": \"messages\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "ok"
}