Allows Mini Apps to send push notifications to users who have saved your app. Notifications require a backend proxy route to handle the actual delivery and enforce rate limiting.
Parameters
NotificationOptions
required
Configuration object for the notification to send.
Required Backend Setup
Notifications require a backend proxy route to handle delivery and rate limiting:Frontend Usage
Rate Limiting Guidelines
Recommended Limits
- Per user: Maximum 10 notifications per hour
- Per app: Maximum 1000 notifications per hour
- Burst protection: Maximum 3 notifications per minute
Implementation Strategy
lib/rate-limit.ts
Best Practices
Content Guidelines
- Be relevant: Only send notifications related to user activity or time-sensitive events
- Personalize: Use user-specific information when available
- Clear value: Ensure each notification provides clear value to the recipient
- Timing: Send notifications at appropriate times (avoid late night/early morning)
Technical Considerations
- Error handling: Always handle notification failures gracefully
- Retry logic: Implement exponential backoff for failed deliveries
- Analytics: Track notification delivery rates and user engagement
- Privacy: Respect user notification preferences and provide opt-out mechanisms
User Experience
- Frequency control: Allow users to control notification frequency
- Category filters: Let users choose types of notifications they want
- Action relevance: Ensure notification action URLs are contextually relevant
When implemented thoughtfully, notifications can significantly increase user engagement and retention for your Mini App. Focus on providing genuine value with each notification sent.