chore: support Twilio API Key auth in ConferenceService

This commit is contained in:
Muhsin
2026-04-08 13:22:16 +04:00
parent a6a612568a
commit 986f3ebc3a
@@ -20,6 +20,10 @@ class Twilio::VoiceTeardownService
end
def twilio_client
@twilio_client ||= Twilio::REST::Client.new(channel.account_sid, channel.auth_token)
@twilio_client ||= 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