Twilio Integration isn't working and I cannot reconfigure it because the gear button is disabled

Backendless Version (3.x / 5.x, Online / Managed / Pro )

6.0.4

Client SDK (REST / Android / Objective-C / Swift / JS )

JS

Application ID

1FD8970D-29A4-9D76-FF5E-678A1A2A5600

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

I have configured the Twilio integration for phone verification including the Account SID, the Auth Token and the Sender Phone Number:

  1. Sending standard registration with phone number should return the transactionId and Twilio sends out an SMS with a code.

Actual Behavior

  1. When I use the standard registration API with a phone number for verification I receive an error: Uncaught (in promise) Error: Configure "Twilio Sender Phone Number"

However, the phone number was configured and if I go back into the Business Logic to modify the configuration of the Twilio Service I the “gear” is disabled so I can’t modify the configuration. The delete button is also disabled so I also cannot remove it and start over.

Please help!!!

Hello @Justin_Rich

I have created an internal ticket BKNDLSS-22853. Your problem will be resolved ASAP.
Sorry for the inconvenience.

Regards,
Inna

Hi @Justin_Rich!

Thank you for contacting us.
I have removed plugin from your app so you can install it with proper credentials. Before installing it again, please, enable “dynamic schema”. It is required for plugin since during installation internal plugin tables will be created. It looks like you have tried to install plugin with disabled “dynamic schema” in your app. That is why you got such behavior.

Sorry for inconvenience. We will take actions to prevent such problems in future.
If you have any other questions I will be glad to answer.

Regards, Andriy

Thank you for the assistance. This worked perfectly and makes sense. Meantime, maybe you can add that to the steps for Twilio integration? That would be helpful.

I have one more question relating to this user verification. My app allows the user to decide whether to use email or phone verification from the client. When the user chooses phone verification using their phone number I would like the user status to be set to enabled once they verify their phone number using the verification code. How can I accomplish this?

I am glad that it helped you.

Unfortunately it is not possible to implement it in proper way at the current moment.
If you enable email confirmation in your app, then you will need to provide valid email for each user.
As bypass you can assign to each user, who is without email, some fake email (like stub@example.com) and after that, during phone validation, you can change status of user via corresponding methods in SDK or via REST endpoint
PUT /:applicationid/:apikey/users/$objectId<[A-Za-z0-9-]+>/status
{
“userStatus”: ENABLED|DISABLED
}

Regards, Andriy

Hi, Andriy. Ok, I tried using the /status endpoint as you suggested above, but I get back this error:

{“code”:3054,“message”:“Operation allowed only for BL logic.”,“errorData”:{}}

The REST endpoint I’m hitting looks like this:

https://api.backendless.com/1FD8970D-29A4-9D76-FF5E-678A1A2A5600/{API_KEY}/users/{objectId}/status

I’d really like to make this work, please advise. Is there an SDK method I can use instead?

Let me add that I have also now tried to use the SDK call Backendless.UserService.enableUser(objectId) and I get the same error.

Hi @Justin_Rich!

I forgot to specify that this route works only with BL key. My mistake, sorry for inconvenience.
In JS SDK next methods are present for user status change in Backendless.Users:

  async enableUser(userId)

  async disableUser(userId)

It is better not to share your BL API key with client app. So I would recommend you to write BL service which will perform user registration and will call one of this methods.

There is no documentation for this methods at the current moment. I have created internal ticket to add documentation.

Regards, Andriy