OTP validation using SMS for mobile apps(android and IOS both)

I want to create a service for phone number  verification in a mobile app. Where on a button click, an SMS with OTP is sent to the user and then he/she verifies it in the mobile app.

I was able to find SMS Cordova Plugin on Forge for sending SMS, but it only works for Android. Whereas the Twilio component is available only for Traditional Web Apps. I couldn't find any component that works for IOS. Whereas

What third party service can I use for sending SMS, and is there a way to connect to a service that does not have a wrapper/component in forge? 

Or is there another way of doing this?

I found a lot of questions on the forums similar to this, but none of them had an satisfactory answers.

Thank you.

Rank: #64

Hi Amol,

Have you checked the SMS Retriever Plugin? It seems to be a good solution for your need.

With this plugin, you can perform SMS-based user verification in your Android app automatically, without requiring the user to manually type verification codes, and without requiring any extra app permissions. It is also mentioned it works in iOS,  "you just need to change an attribute in the input field. - autocomplete - "one-time-code"".

Hope it helps.



Rank: #19

Hi Amol,

Any Plugin only runs on your device, and that's not what you want when sending an SMS. You want your authentication server to send the SMS so that it can trust your device. For that you need services like Twilio, called from the server side. 

The fact that the Twilio component is Traditional Web shouldn't impact your (mobile) applications, as Twilio functionality is not UI-related and you should still be able to reference any actions or structures needed.

For SMS Sending services that don't have a pre-built forge component, they typically will have a web-services interface that you can consume from OutSystems directly (check this course on how to consume web-services).

Hope this helps!

Rank: #1824

Does it mean that it's possible to use any third party sms service that has a web service interface?(Like even if it doesn't have a pre built in forge component?)