Login with Test Account
Click "Login with Facebook" and use the test account credentials provided in the App Review submission.
MOA C&C Korean Medical Tourism Platform - Two-way Instagram Direct Message Integration
When international patients send DMs to our hospital's Instagram account, we receive them in real-time through Meta's Webhook system. This enables immediate response to medical inquiries.
Using POST /{ig-user-id}/messages API, we send personalized
responses to patient inquiries about procedures, pricing, and appointments.
Messages are analyzed by Gemini AI to understand intent (consultation request, pricing inquiry, appointment booking) and generate appropriate responses in the patient's language.
All conversations are stored in AlloyDB PostgreSQL for quality assurance, follow-up management, and providing context when patients return with additional questions.
Instagram sends message events to /webhook/instagram endpoint hosted on Cloud Run
Extract sender IGSID, message text, and timestamp. Store in AlloyDB with UUID tracking
Gemini AI classifies intent and generates multilingual response based on hospital services
Call POST /{ig-user-id}/messages with recipient IGSID and response text
Respond to inquiries from any timezone instantly, crucial for international patients
AI detects language and responds in English, Japanese, Chinese, or Korean
Track conversation history and identify high-intent prospects for follow-up
Average response time under 30 seconds vs hours for manual handling
Authenticate with Facebook and connect Instagram Business Account
See messages received via Webhook in real-time
Reply to messages using Graph API
Login with Facebook to access Instagram DM management features.
Required permissions: instagram_basic, instagram_manage_messages
â Connected to Instagram Business Account
Uses POST /{ig-user-id}/messages Graph API endpoint
đĄ Tip: You can get IGSID from the "Received Messages" section above, or use the test IGSID: 7234567890123456
message_idClick "Login with Facebook" and use the test account credentials provided in the App Review submission.
From a different Instagram account, send a DM to @alllitingpsjpn (our test business account).
Click "Refresh" button to see the received message appear in "Step 2: Received Messages" section with sender IGSID.
Click "Reply" button on the received message, type a response, and click "Send Direct Message".
Check that the reply was received on the sender's Instagram account, demonstrating complete two-way messaging.
Waiting for API calls...
This panel shows real-time API responses:
- Webhook messages from /api/dm/messages
- Send message via POST /api/dm/send
- Graph API: POST /{ig-user-id}/messages
1809466552972599
v21.0
/webhook/instagram
POST /{ig-user-id}/messages
AlloyDB PostgreSQL
Google Cloud Run (asia-northeast3)