diff --git a/server/notification-providers/twilio.js b/server/notification-providers/twilio.js index 8f4db0404..a908fb21e 100644 --- a/server/notification-providers/twilio.js +++ b/server/notification-providers/twilio.js @@ -10,6 +10,7 @@ class Twilio extends NotificationProvider { let okMsg = "Sent Successfully."; let accountSID = notification.twilioAccountSID; + let apiKey = notification.twilioApiKey ? notification.twilioApiKey : accountSID; let authToken = notification.twilioAuthToken; try { @@ -17,7 +18,7 @@ class Twilio extends NotificationProvider { let config = { headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "Authorization": "Basic " + Buffer.from(accountSID + ":" + authToken).toString("base64"), + "Authorization": "Basic " + Buffer.from(apiKey + ":" + authToken).toString("base64"), } }; diff --git a/src/components/notifications/Twilio.vue b/src/components/notifications/Twilio.vue index 3edf1e3df..d923866b0 100644 --- a/src/components/notifications/Twilio.vue +++ b/src/components/notifications/Twilio.vue @@ -5,7 +5,18 @@
+ The API key is optional but recommended. You can provide either Account SID and AuthToken + from the may TwilioConsole page or Account SID and the pair of Api Key and Api Key secret +
+