- Handling Telnyx webhooks
- Parsing SMS payloads
- Sending SMS responses via Telnyx API
Prerequisites
- Telnyx account with a phone number
- Phone number configured for SMS
Step 1: Create the Function
Step 2: Implement the Handler
Replacesrc/index.js:
Step 3: Configure Secrets
Get your API key from the Telnyx Portal under API Keys. Use your Telnyx phone number in E.164 format.
Step 4: Deploy and Configure Webhook
- Go to Messaging → Phone Numbers
- Select your number
- Set webhook URL to
https://sms-handler-{orgId}.telnyxcompute.com