Notifications
Remove FCM Token
Removes a Firebase Cloud Messaging (FCM) token from the user’s registered devices. Call this when user logs out or disables notifications.
Remove FCM Token
Documentation Index
Fetch the complete documentation index at: https://docs.traza.com.au/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Removes a Firebase Cloud Messaging (FCM) token from the user’s registered devices. This endpoint should be called when:- User logs out
- User disables push notifications
- App is uninstalled (if possible to detect)
Use Cases
- User Logout: Remove device token to stop receiving notifications
- Disable Notifications: User opts out of push notifications in settings
- Device Cleanup: Remove old/unused device registrations
Important Notes
Invalid tokens are automatically cleaned up by the system when FCM delivery fails, but manual removal on logout is recommended.
Example Usage
React Native/Expo
Using React Hook
Behavior
When a token is removed:- Device token is deleted from user’s
fcmTokensmap in Firestore - Device will no longer receive push notifications
- Other registered devices remain active and continue receiving notifications
- Operation is idempotent - safe to call multiple times
Related Endpoints
- Register FCM Token - Register device for notifications
- Update FCM Token Usage - Track active devices
See Also
- FCM Push Notifications Guide - Complete implementation guide
- Token Lifecycle Documentation - Token management best practices
Remove FCM Token