Public
Like
wikiapptry
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v18View latest version
This directory contains the backend code for the WhatsApp Wikipedia Bot.
GET /webhook- Verification endpoint for WhatsApp webhook setupPOST /webhook- Receives incoming WhatsApp messages
All admin endpoints require an API key to be sent in the X-API-Key header.
GET /admin/topics- Get all available topicsPOST /admin/facts- Add a new fact- Required fields:
topic,content - Optional fields:
source
- Required fields:
POST /admin/audio- Add a new audio clip- Required fields:
title,url,topic - Optional fields:
description,duration
- Required fields:
POST /admin/video- Add a new video clip- Required fields:
title,url,topic - Optional fields:
description,duration
- Required fields:
DELETE /admin/facts/:id- Delete a factDELETE /admin/audio/:id- Delete an audio clipDELETE /admin/video/:id- Delete a video clip
GET /health- Check if the service is running
WHATSAPP_VERIFY_TOKEN- Token for WhatsApp webhook verificationWHATSAPP_TOKEN- WhatsApp Business API tokenWHATSAPP_PHONE_NUMBER_ID- WhatsApp phone number IDADMIN_API_KEY- API key for admin endpoints
The application uses SQLite for storage with the following tables:
whatsapp_wiki_users_v1- User information and preferenceswhatsapp_wiki_facts_v1- Fun factswhatsapp_wiki_audio_v1- Audio clipswhatsapp_wiki_video_v1- Video clips