#13636·appwrite

Add `expiry` parameter to Magic URL and Email OTP

Author: abhishek-junghareCreated Sep 12, 2026Updated Sep 14, 2026
Labelsproduct / messaging

Enhancement description

Currently, magic link expires in 1 hour and email otp expires in 15 minutes. It would be better if we could customize the expiry time either of these have.

await account.createMagicURLToken({
    userId: ID.unique(),
    email: '[email protected]',
    url: 'https://example.com/verify',
    expiry: 300 // 5min
});
await account.createEmailToken({
    userId: ID.unique(),
    email: '[email protected]',
    expiry: 300 // 5min
});

Pitch

Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

Have you read the Code of Conduct?