Skip to content
Back

How to get OTP code in SMTP email template

  • 0
  • Apple
  • Cloud
fofopuff
18 Jul, 2025, 21:03

I don't know how to get the OTP code to show in my custom email template for email authentication using OTP.

I have email authentication set up for iOS app, and I'm using resend for my SMTP. Everything seems to work well; the user an receive the email in test, except I don't know what variable (or something else) to use to show the OTP code in the email the user receives.

I customized the email template in Auth -> Templates -> OTP Session.

If we can't get the OTP to show, then the custom template feature for email auth isn't usable. Does anyone know how to solve this?

TL;DR
Developer needs help displaying OTP code in custom email template for email authentication using SMTP on iOS app. Customized email template in Auth -> Templates -> OTP Session, but unsure how to show OTP code in the email received by user. Without displaying OTP, custom template feature for email auth isn't usable.
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