Koha How-To

Koha Question of the Week: How Does Twilio Work with Koha?

Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!

Question: How Does Twilio Work with Koha?

Some of our partners subscribe to Twilio for SMS messages and patron notifications from Koha. We've been seeing an uptick in interest in how it works with Koha. The feedback from the community has been overall positive with the service both in cost and ease of use!

If you are one of our partners and have a Twilio account, we can help you set up the connection.

You'll want to go to your System Preference SMSSendDriver, type in Twilio in the blank:

Use the SMS::Send:: Twilio driver to send SMS messages.

Next, you will need to put in a support ticket for our Systems Team to finish the connection. In the ticket, we will need the following information that you can get from accessing your Twilio account:

Twilio_accountsid:
twilio_authtoken:
twilio_from:


Please note: Phone numbers (including the above twilio_from) need to be in the format of +11234567890 or 1234567890.

If your phone numbers (In Koha, SMSAlertNumber) are not captured in that format, it will take some data clean-up in order to get your phone numbers ready.

Our Systems Team will finish the backend connection and your library will be all set!

Nothing will need to be done in Twilio. Twilio is simply sending the SMS notices that Koha generates, so you don't need to do anything with your patron messaging preferences or your notice setup. The notice generation isn't changing, you're just swapping out how you send those notices once they exist.

What About Twilio Voice?

Twilio Voice is a bit different and more complex than setting up Twilio SMS. Kyle, one of our Developers, just released the Twilio Voice plugin for Koha. This development was graciously sponsored by Ajax Public Library in Canada.

This plugin allows Koha to send 'phone' notices via the Twilio service API.

Github: Twilio Voice plugin for Koha

Koha configuration

  • Ensure the syspref PhoneNotification is enabled.
  • Ensure the syspref TalkingTechItivaPhoneNotification is disabled.
  • Make sure the _phone_ version of your notices has content. You can see these notices under "Notices & slips" in Tools. Then find the notice you would like, click on "Edit" and navigate to the Phone options.

Important to Note:

  • These notices will be read as-is over the phone via Twilio.
  • Best to keep notices as terse as possible.
  • Repeat the entire notice twice in case the call goes to voicemail.

Plugin Configuration

  • Create a Twilio account, log in to Twilio
  • Create a new project
  • Get a trial number, or verify an existing phone number for this project
  • Verify your phone number for testing purposes
  • Note your Account SID and Auth Token on the project landing page
  • Browse to the Twilio plugin configuration page in Koha
  • From there, you can plug in the Account SID, Auth Token, and Twilio phone number from your Twilio project

We hoped this help you get a better understanding of the options when using Twilio with Koha. If you are one of our partners, and you have questions, please reach out!

Check back next week for the Koha Question of the Week!

Read more by Kalleen Marquise

Tags twilio