Connect Twilio to PHPNuxBill
Send PHPNuxBill messages through your Twilio account, from a number, sender ID or messaging service.
Before you start
- A Routely account (how it works).
- A Twilio account with credit, and a way to send from it: a Twilio phone number, a sender ID where Twilio allows one for your destination, or a messaging service.
- Your Account SID and Auth token, both on the home page of the Twilio Console.
Add Twilio as a gateway
- In PHPNuxBill open Routely, then SMS, then Gateways.
- Under Add a gateway, choose Twilio.
- Give it a name, for example "Twilio backup".
- Account SID: starts with
AC, followed by 32 letters and numbers. - Auth token: next to the Account SID in the Twilio Console. It is stored encrypted and is never shown again.
- Fill in one of these two:
- From: a Twilio phone number in international format, for example
+15551234567, or an alphanumeric sender ID where Twilio allows one. - Messaging service SID: starts with
MG. Use this instead of From if you send through a messaging service.
- From: a Twilio phone number in international format, for example
- Messages per minute: 60 is filled in. Lower it to send more gently.
- Press Add gateway. Routely checks your Account SID and token with Twilio, and tells you if they are refused.
Send a test message
- On the same page, find Send a test message.
- Under Send through pick this gateway, so it is tested alone.
- Enter a phone number with the country code and press Send test.
- Open SMS, then History. The message shows as sent when Twilio has accepted it.
If it does not work
- Twilio did not accept the details. Copy the Account SID and Auth token again from the Console. If you regenerated the token, use the new one.
- The message failed. History shows the reason Twilio gave. Common causes are an empty balance, a From number that cannot send to that country, and a trial account that can only message numbers you have verified.
- The gateway is resting. After three failed messages in a row it rests for five minutes and messages go to your next gateway. Fix the cause, then press Use again now.
More guides: Connect Termii to PHPNuxBill and Connect Africa's Talking to PHPNuxBill. Any other provider with a web address works too: choose Custom web address when you add a gateway. Questions: support@focuslinkstech.com.ng, WhatsApp or Telegram. Focuslinks Digital Solutions, Lekki, Lagos, Nigeria.