I change the configuration from using my main Twilio account SID and authentication tokens to a newly created Twilio sub-account SID and authentication token. I get these errors in the log. The phone number I'm using is valid, it works when I use the main account credentials.
This sounds similar to something that was fixed in an earlier version.
## Data Model
2288: Twilio: Connections to multiple sub accounts causes all but one to have an authentication error
Fixed a regression which caused account credentials of the last loaded Twilio account to be used for all Twilio accounts. Multiple Twilio accounts can now be used without authentication errors
https://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2021/42410/85
BTW, I'm running version 8.1.18.
First Error
com.twilio.exception.ApiException: The From phone number +XXX is not a valid, SMS-capable inbound phone number or short code for your account.
at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:505)
at com.digitalpetri.ignition.twilio.accounts.TwilioAccount$ConnectedTwilioAccount.lambda$sendSms$6(TwilioAccount.java:346)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Second Error
java.util.concurrent.ExecutionException: com.digitalpetri.ignition.twilio.accounts.TwilioAccount$TwilioAccountException: The From phone number +XXX is not a valid, SMS-capable inbound phone number or short code for your account.
at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
at com.digitalpetri.ignition.twilio.accounts.TwilioAccount$ConnectedTwilioAccount.sendSms(TwilioAccount.java:358)
at com.digitalpetri.ignition.twilio.alarming.TwilioNotificationProfile.lambda$sendNotification$2(TwilioNotificationProfile.java:125)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at com.digitalpetri.ignition.twilio.alarming.TwilioNotificationProfile.sendNotification(TwilioNotificationProfile.java:120)
at com.inductiveautomation.ignition.alarming.pipelines.blocks.NotificationBlock$NotificationContextImpl.run(NotificationBlock.java:521)
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:539)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.digitalpetri.ignition.twilio.accounts.TwilioAccount$TwilioAccountException: The From phone number +XXX is not a valid, SMS-capable inbound phone number or short code for your account.
at com.digitalpetri.ignition.twilio.accounts.TwilioAccount$ConnectedTwilioAccount.lambda$sendSms$6(TwilioAccount.java:354)
... 5 common frames omitted
Thank you.