Back

Issue with Appwrite Phone Auth and MSG91 Integration: Missing OTP in SMS

  • 2
  • Self Hosted
  • Flutter
  • Auth
Arvind Sangwan
19 Apr, 2024, 01:55

Although the SMS delivery is successful, the OTP (One-Time Password) required for authentication is not included in the message received by the user. This renders the authentication process incomplete and unusable for our intended purposes.

SMS Template: OTP ##var## for ##var##. Please do not share it with anyone. OTP is valid for 5 minutes.

SMS Received by User: OTP for . Please do not share it with anyone. OTP is valid for 5 minutes.

Appwrite Version: 1.5.4

TL;DR
Developers are experiencing an issue with Appwrite Phone Auth and MSG91 integration where the OTP is missing in SMS messages. The problem lies with Appwrite not using the variable in MSG91 to send the SMS API correctly. Attempts to register a new template with the OTP variable failed due to a warning message indicating no variables found in the template. The user is unable to set the ##content## variable in the SMS template despite successful delivery. To fix this issue, the developers need to ensure that the correct variable (##content##) is set in the SMS template for the OTP to be included in the message received by the user.
Steven
19 Apr, 2024, 01:57

Would you please set your variable to ##content##?

Arvind Sangwan
19 Apr, 2024, 02:02

Okay, I can set ##content## and update you after verifying a new SMS template. it may take some time.

Arvind Sangwan
19 Apr, 2024, 06:35

I am unable to set the ##content## variable in the SMS template.

Steven
19 Apr, 2024, 06:37

why's that?

Arvind Sangwan
19 Apr, 2024, 06:38

Due to TRAI(Telecom Regulatory Authority of India) and DLT rules.

Arvind Sangwan
19 Apr, 2024, 06:41

@Steven Is there any other way to resolve this issue?

Steven
19 Apr, 2024, 06:43

that doesn't make sense. the only thing you changed in the template is the variable name and that was rejected?

Arvind Sangwan
19 Apr, 2024, 07:01

Actually, not rejected. When I'm attempting to register a new template, the platform displays a warning message indicating that no variables were found in the template.

New template: OTP ##content## for ##project##. Please do not share it with anyone. OTP is valid for 5 minutes.

Arvind Sangwan
19 Apr, 2024, 07:04

There is any template for the OTP in Appwrite? @Steven

Arvind Sangwan
19 Apr, 2024, 07:49

Hi @Steven I understand that the OTP is not being included in the message because Appwrite is not using the variable in MSG91 to send the SMS API.

https://github.com/utopia-php/messaging/blob/main/src/Utopia/Messaging/Adapter/SMS/Msg91.php

https://docs.msg91.com/sms/send-sms?version=V5 or https://docs.msg91.com/otp/sendotp?version=V5

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more