The plugin was using outdated Telnyx API v1 endpoints and authentication methods, causing message sending failures with "invalid" response errors.
- Old:
https://sms.telnyx.com - New:
https://api.telnyx.com/v2
- Old:
x-profile-secret: [SECRET] - New:
Authorization: Bearer [API_KEY]
- Old:
bodyparameter for message text - New:
textparameter for message text
- Old:
delivery_status_webhook_url - New:
webhook_url
- Old: Expected
response->statusandresponse->sms_id - New: Properly parse
response->data->idandresponse->data->to[0]->status - Added support for multiple status values:
queued,sending,sent
- Old:
response->messagefor errors - New:
response->errors[0]->detailfor proper error messages
- Updated to handle Telnyx v2 webhook format with nested structure
- Added support for
message.finalizedevent type for delivery receipts - Added support for
message.receivedevent type for incoming messages - Properly extract data from
data->payloadstructure - Added handling for additional status values:
queued,sending_failed,delivery_failed,delivery_unconfirmed
- Changed "Secret" to "API Key" for better clarity
After these changes, the plugin should:
- Successfully send messages via Telnyx API v2
- Properly parse success responses with message IDs
- Handle delivery receipts via webhooks
- Process incoming messages correctly
If you're upgrading from the old version:
- Update your configuration with a Telnyx API Key (not the old profile secret)
- The API Key should be a Bearer token from your Telnyx account
- Ensure your webhook URL is configured in your Telnyx Messaging Profile