https://exultingly-subchorionic-chante.ngrok-free.dev
- Open: https://console.twilio.com
- Left sidebar → Messaging → Try it out → Send a WhatsApp Message
- Click the Sandbox Settings tab
- In the field "WHEN A MESSAGE COMES IN", paste:
https://exultingly-subchorionic-chante.ngrok-free.dev/webhook - Set method to HTTP POST
- Click Save
- Open WhatsApp on your phone
- Send a message to: +1 415 523 8886 (Twilio sandbox number)
- Message body: join [your-sandbox-word]
- Find your sandbox word in: Twilio Console → Messaging → WhatsApp → Sandbox Settings
- It looks like "join [word]-[word]" e.g.
join red-apple
- You'll get a confirmation: "You are now connected to the sandbox"
Send any of these to +1 415 523 8886:
| Message | What happens |
|---|---|
मुझे राशन कार्ड चाहिए |
Intent detected → form summary auto-filled from DigiLocker |
I want to apply for pension |
Pension form auto-filled |
ration card or 1 |
Same as Hindi ration card |
YES |
Confirms form → triggers portal fill → asks for OTP |
| Any 6-digit number | Submits OTP → form completed ✅ |
0 or reset |
Start over |
User: मुझे राशन कार्ड चाहिए
Bot: 📋 Your Form Summary (from DigiLocker)
🟢 Name: Ram Kumar Sharma (DigiLocker)
🟢 Aadhaar: XXXX-XXXX-9087 (DigiLocker)
🟢 DOB: 1985-03-15 (DigiLocker)
🟡 Family members: 4 (estimated — can correct)
🟡 Income: ₹1,20,000 (estimated)
Confidence: 74%
Reply YES to submit | Send corrections like "income 80000"
User: YES
Bot: 🌐 Filling form on portal...
📍 https://nfsa.gov.in/
📝 10 fields entered (from DigiLocker)
🔐 OTP required — send the 6-digit code
User: 123456
Bot: ✅ OTP Submitted!
Your form has been submitted successfully.
You'll receive a confirmation SMS.
- ✅ 100% working — uses realistic demo data automatically
- ✅ No DigiLocker account needed
- ✅ Shows real name (Ram Kumar Sharma), real Aadhaar format, real address
- ✅ PII masked (XXXX-XXXX-9087 format)
- ✅ Confidence scores shown per field (🟢🟡🔴)
- Judges see the full agent flow working end-to-end
- Apply at: https://developers.digilocker.gov.in
- Fill "Application for API Access" form
- Approval takes 4–8 weeks (government process)
- Once approved → add to
.env:DIGILOCKER_CLIENT_ID=your_client_id DIGILOCKER_CLIENT_SECRET=your_secret DIGILOCKER_REDIRECT_URI=https://your-domain.com/callback/digilocker - Everything else stays the same — the code already handles real DigiLocker OAuth
# Test via REST API directly:
curl -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "I want a ration card", "user_id": "test", "phone": "9999999999"}'Or open: http://localhost:8000/docs → /api/chat → Try it out
# Start Streamlit dashboard (separate terminal):
.venv\Scripts\streamlit run dashboard\app.py
# Open: http://localhost:8501| Issue | Fix |
|---|---|
| "Invalid Twilio signature" | TWILIO_AUTH_TOKEN not set in .env (auto-skipped in dev) |
| Bot not responding on WhatsApp | Check ngrok tunnel, verify webhook URL in Twilio Console |
| ngrok URL expired | Restart: ngrok http 8000 --pooling-enabled |
| "No module found" error | Run: pip install -r requirements.txt |