playSMS One Time Password plugin

Hi,

Introducing a simple OTP sender: https://github.com/playsms/plugin-otp/releases/tag/1

URL: https://github.com/playsms/plugin-otp

anton

Tested and it returns the OTP but should it not store it with the msisdn to do the final check when the user has to use the OPT to compare the input ?

Can you rephrase what you wrote, I dont get what you mean, thanks

Anton

Basically once the OTP is generated I thought is must be stored somewhere so when you use if for a verification the end user will enter the OTP and I will compare it to the one stored.
Maybe I was looking for a typical practical example on how to use it.

there will be 3 parties involved when using this plugin:

A: playSMS with OTP plugin
B: the mobile user
C: external app that does verification

Here is the flow:

  1. B accessing C service, for example login or anything that requires mobile verification
  2. C consume A webservices, accessing OTP plugin with msisdn is B number
  3. A returns OTP to C and along with that B number (which actually don’t need because A already know it)
  4. A also send SMS to B
  5. B receives SMS from A and the content of that SMS is the OTP, the same OTP that C receives from A
  6. B then enter OTP to C

I hope that make senses

anton

Thanks yes is all makes sense just needed to know the flow, but I get it now.

cc @aacable79

would love to see this one used by Mikrotik or something.

anton

Hello Anton, What is the OTP expiry time? Nigyel.

expiry time managed by calling apps, so no option for that in the plugin

anton

OK, thanks… will try it out… :slight_smile:

Runnig PlaySMS version 1.4.2 and the plugin just gives error - 200. In the log it says the user doesn’t have enough credit even though there is credit. I confirmed other SMS messages are going through. I have restarted playsmd just incase

0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 otp_hook_webservices_output # OTP start sending u:mymanganetworks msisdn:254722123456 template:Your Mymanga code is {OTP}
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 sendsms # start uid: sender_id: smsc:
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 sendsms_queue_create # saving queue_code:53213cd6021fdaf735faf1bdfa5430ae src: scheduled:2019-10-17 23:05:05
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 sendsms_queue_create # saved queue_code:53213cd6021fdaf735faf1bdfa5430ae id:34
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 sendsms # dst_count:1 sms_count:1 total_charges:1
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 sendsms # failed user do not have enough credit. credit: dst:1 sms_count:1 total_charges:1
0.0.0.0 example.com 2019-10-17 23:05:05 PID5da8d78195e69 - L2 otp_hook_webservices_output # OTP status:ERR error:200 otp: u:mymanganetworks msisdn: smslog_id: