Simple bot to answer WhatsApp messages.
HTML form for interacting with the function.
Receives a message, validates its signature, and sends a response back to the sender.
Parameters
| Name | Description | Location | Type | Sample Value |
|---|---|---|---|---|
| Content-Type | Content type of the request | Header | application/json |
N/A |
| Authorization | Webhook signature for verification | Header | String | Bearer <signature> |
| from | Sender's identifier. | Body | String | 12345 |
| text | Text content of the message. | Body | String | Hello! |
All parameters are coming from Vonage webhook. Exact documentation can be found in Vonage API Docs.
Response
Sample 200 Response:
{
"ok": true
}Sample 400 Response:
{
"ok": false,
"error": "Missing required parameter: from"
}Sample 401 Response:
{
"ok": false,
"error": "Payload hash mismatch."
}| Setting | Value |
|---|---|
| Runtime | Node (18.0) |
| Entrypoint | src/main.js |
| Build Commands | npm install |
| Permissions | any |
| Timeout (Seconds) | 15 |
API Key to use the Vonage API.
| Question | Answer |
|---|---|
| Required | Yes |
| Sample Value | 62...97 |
| Documentation | Vonage: Q&A |
Secret to use the Vonage API.
| Question | Answer |
|---|---|
| Required | Yes |
| Sample Value | Zjc...5PH |
| Documentation | Vonage: Q&A |
Secret to verify the webhooks sent by Vonage.
| Question | Answer |
|---|---|
| Required | Yes |
| Sample Value | NXOi3...IBHDa |
| Documentation | Vonage: Webhooks |
Vonage WhatsApp number to send messages from.
| Question | Answer |
|---|---|
| Required | Yes |
| Sample Value | +14000000102 |
| Documentation | Vonage: Q&A |