Read one time password form SMS in ionic app


I am building an ionic app which receives one time password via SMS. I want to auto detect that password. how can i do that?


Did you tried

i tried this things but it is not working

Below is my code which is working fine, It waits for OTP to receive and as soon as its received it reads that OTP.

if(cordova != undefined){	
var smsInboxPlugin = cordova.require('cordova/plugin/smsinboxplugin');
smsInboxPlugin.isSupported (function(supported) {
	  smsInboxPlugin.startReception (function(msg) {
	    $scope.input.code = msg;
	    // We got sms, now stop receptor
	helper.popup("Notice","Please enter OTP you received");


var smsInboxPlugin = cordova.require(‘src/org/apache/cordova/plugin/SmsInboxPlugin’);
smsInboxPlugin.isSupported ((function(supported) {
alert(“SMS supported !”);
alert(“SMS not supported”);
}), function(error) {
alert(error);// i am getting error here class not found

Sorry i read your reply today, did you solved it ?

var smsInboxPlugin = cordova.require(‘cordova/plugin/smsinboxplugin’);
I got error here

Whats the error text ? Be descriptive so others reading can help you as well.

532076 error module cordova/plugin/smsinboxplugin not found
I got only This error
this is my plugin path

0 256867 error Uncaught ReferenceError: cordova is not defined, htt
p://, Line: 23
0 257188 error Uncaught ReferenceError: cordova is not defined, htt
p://, Line: 23

You can use this plugin by Sandeep Dillerao