campaign_connector/test_contacts.sh
admin 498e1ab6ca Bunch of improvements:
- Refactored the dashboard html into seperate pages and all the necessary components
- Added login and secured api routes / debugged getting system working on a tailnet.
- added some functionality to the debugging and health endpoints
- added in a new phone contact import and debugged.
2025-12-31 15:02:28 -07:00

34 lines
995 B
Bash
Executable File

#!/bin/bash
# Test script for contact list endpoints
PHONE_IP="${PHONE_IP:-10.0.0.193}"
BASE_URL="http://${PHONE_IP}:5001"
echo "=================================================="
echo "Testing Termux Contact List API"
echo "=================================================="
echo ""
echo "1. Testing /api/contacts/test endpoint..."
echo " This will show us the raw JSON structure"
echo ""
curl -s "${BASE_URL}/api/contacts/test" | python3 -m json.tool
echo ""
echo ""
echo "=================================================="
echo "2. Testing /api/contacts/list endpoint..."
echo " This will fetch all contacts"
echo ""
curl -s "${BASE_URL}/api/contacts/list" | python3 -m json.tool | head -50
echo ""
echo "=================================================="
echo "Done! Check the output above to see:"
echo " - What fields are available (name, number, etc.)"
echo " - The JSON structure"
echo " - Total contact count"
echo "=================================================="