From a6a612568aa4c4c1fbec8396459990b956b89f53 Mon Sep 17 00:00:00 2001 From: Muhsin <12408980+muhsin-k@users.noreply.github.com> Date: Wed, 8 Apr 2026 13:21:00 +0400 Subject: [PATCH] chore: support Twilio API Key auth in ConferenceService --- .../services/voice/provider/twilio/conference_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/enterprise/app/services/voice/provider/twilio/conference_service.rb b/enterprise/app/services/voice/provider/twilio/conference_service.rb index 9f87fd354..30721bfb5 100644 --- a/enterprise/app/services/voice/provider/twilio/conference_service.rb +++ b/enterprise/app/services/voice/provider/twilio/conference_service.rb @@ -35,7 +35,11 @@ class Voice::Provider::Twilio::ConferenceService def twilio_client @twilio_client ||= begin channel = conversation.inbox.channel - ::Twilio::REST::Client.new(channel.account_sid, channel.auth_token) + if channel.api_key_sid.present? && channel.try(:api_key_secret).present? + ::Twilio::REST::Client.new(channel.api_key_sid, channel.api_key_secret, channel.account_sid) + else + ::Twilio::REST::Client.new(channel.account_sid, channel.auth_token) + end end end end