This is only for testing purpose, a fake requests and response for whatsapp business api
git clone https://github.com/ilmiawan/fake-whatsapp-server
cd fake-whatsapp-server
npm install
npm run start
Login
curl --request POST \
--url http://localhost:3030/v1/users/login \
--header 'Authentication: Basic asdfalskfjasdklfjsladkfjasl;kjfdlks;ajflk;asdjflkasjf' \
--header 'Content-Type: application/json'
check-contacts
curl --request POST \
--url http://localhost:3030/v1/cntacts/ \
--header 'Authentication: Basic asdfalskfjasdklfjsladkfjasl;kjfdlks;ajflk;asdjflkasjf' \
--header 'Content-Type: application/json' \
--data '{
"blocking": "wait",
"contacts": [
"+6281234567890"
]
}'
send-messages-template-text
curl --request POST \
--url http://localhost:3030/v1/messages/ \
--header 'Authentication: Basic asdfalskfjasdklfjsladkfjasl;kjfdlks;ajflk;asdjflkasjf' \
--header 'Content-Type: application/json' \
--data '{
"to": "{{Recipient-WA-ID}}",
"type": "template",
"template": {
"namespace": "<Message Template Namespace>",
"name": "<Message Template Element Name>",
"language": {
"policy": "<Message Template Language Policy>",
"code": "<Message Template Language Code>"
},
"components": [{
"type": "body",
"parameters": [
{
"type": "<param type>",
"text": "<param value>"
}
]
}]
}
}'