Hi Backendless Team,
My intended scenario is that already registered user will be asked to add and confirm his phone number to access additional features in app. I might not fully understand why am I unable to get verification code from Twilio.
Error i am getting is: “Twilio.sendVerificationCode” method is allowed from BusinessLogic only.
App ID: F001F3BF-4CCD-B35E-FFD0-23845DEE6000
page: validate-phone-number
I’m trying to send code on frontend, when the user enters his phone number and clicks the button:
You install a Twilio service. This service contains “Public” and “Private” methods. Public methods could be used anywhere as is. But Private methods require a Cloud Code API key in their invocation context, so if you want to use this method, you should create your own API service that will call this Private method.
initially I was getting 21211 error message about invalid phone number. That was resolved by using trial number from twilio.
After that I upgraded my twilio account, and now I have my phone number and trial number assigned with twilio.
But now I am getting error: Configure “Twilio Sender Phone Number”.
But when I view Service Configuration for Twilio, it erases previously added Account SID, Auth Token, Twilio Sender Phone Number.
And this repeats itself > I add those values from my Twilio dashboard,
When I press Test Configuration it says Test Passed,
Then I press Save all seems ok,
but if I open the Configuration, it erases thoses values.
-Same if I try to Invoke, then it throws the error that I havent configured sender number.
Resolved:
After refreshing screens, the gear icon went inactive for configuring Twilio. Decided to Uninstall, and Install it again. This worked - Configuration is possible to save and logic mentioned above is working.