Notifications Configuration

Configure email, push, and webhook notifications for the Temp-Number App to keep users informed about their account activities.

Email Notifications

The Temp-Number App uses email notifications to inform users about important events such as account and payment related events.

Email notifications are sent by:

  • Firebase Auth: For authentication-related emails (e.g., password resets, email verification)
  • Backend API: For other notifications (e.g., payment receipts, account changes)

Configuring Email Service

To configure email notifications, you need to set up an SMTP server or use a third-party email service provider. Update the following environment variables in the Temp-Number Backend configuration:

#############################################################################
# Email Configuration (SMTP)
#
# Settings for sending emails (e.g., contact form, notifications)
#############################################################################

SENDMAIL_ENABLED=false

# Domain for email notification links
EMAIL_NOTIFICATION_SITE_DOMAIN=example.com

# SMTP server settings
SMTP_HOST=smtp.ethereal.email
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=username

# Contact form email addresses
CONTACT_FORM_EMAIL_TO=[email protected]
CONTACT_FORM_EMAIL_FROM=[email protected]

The email templates are stored in the database table tn_notification_templates. It uses mjml for email template rendering.

Templates are stored in commmands/notification_templates/ folder as YAML files. You can customize them and import them using the following command:

node ace migrate:notification-templates

Push Notifications

Push notifications are used to send real-time updates to users’ mobile devices. The Temp-Number App uses Firebase Cloud Messaging (FCM) for push notifications.

Database table tn_customer_fb_tokens stores the FCM tokens for each user device.

Webhook Notifications

Platfone supports webhook notifications to notify your external systems about important events such customer status changes, payments, etc.

We recommend to configure webhook in Platfone Admin Dashboard to send notification about the following events:

  • customer.activation.updated
  • customer.updated

Webhook URL should point to following endpoint in your Temp-Number Backend:

https://<YOUR-BACKEND-URL>/<API_URL_PREFIX>/handleWebhook