Skip to content
Back

msg91 otp not working after 1.5 upgrade

  • 0
  • Self Hosted
  • Auth
rohan
13 Mar, 2024, 12:30

Hi, I have set it up according to the docs https://appwrite.io/docs/advanced/self-hosting/sms the OTP for login was working before the upgrade to 1.5

appwrite-worker-messaging logs

TypeScript
Warning: Undefined array key "templateId" in /usr/src/code/src/Appwrite/Platform/Workers/Messaging.php on line 461
[Job] (65f19b7b27cfc0.65895609) failed to run.
[Job] (65f19b7b27cfc0.65895609) Utopia\Messaging\Adapter\SMS\Msg91::__construct(): Argument #3 ($templateId) must be of type string, null given, called in /usr/src/code/src/Appwrite/Platform/Workers/Messaging.php on line 461
[Error] Type: TypeError
[Error] Message: Utopia\Messaging\Adapter\SMS\Msg91::__construct(): Argument #3 ($templateId) must be of type string, null given, called in /usr/src/code/src/Appwrite/Platform/Workers/Messaging.php on line 461
[Error] File: /usr/src/code/vendor/utopia-php/messaging/src/Utopia/Messaging/Adapter/SMS/Msg91.php
[Error] Line: 21
TL;DR
Msg91 OTP not working after upgrade to 1.5 version. Error message shows undefined array key "templateId" in Messaging.php. User seeks help in setting custom template for OTPs, logging the message body, and troubleshooting the sms OTPs issue. Solution: The error is due to an incorrect argument type in Msg91 constructor. Argument #3 ($templateId) must be of type string, not null.
Steven
13 Mar, 2024, 12:52

Oye. Would you please create an issue?

rohan
13 Mar, 2024, 12:54

in github?

Steven
13 Mar, 2024, 13:02

Yes

rohan
13 Mar, 2024, 13:55

Created

rohan
13 Mar, 2024, 13:56

@Steven can you please let me know how to log the sms otps in logs of appwrite-worker-messaging

Shiba
13 Mar, 2024, 13:58

See the doc for certificate worker the same way you can log the messaging use -f to continuously log it

Shiba
13 Mar, 2024, 13:58

Or else install docker extension in vscode

rohan
13 Mar, 2024, 14:46

i want to log out the message body being sent

rohan
13 Mar, 2024, 15:42

@Steven how to set custom template for otps being sent?

Steven
13 Mar, 2024, 15:53

you can't in Appwrite

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