Search code examples
push-notificationfirebase-cloud-messagingexpostoragepush

Where does FCM keep expo tokens?


Still haven't implemented a way for expo tokens to be saved on a database, but from FCM console can send notifications to all devices that have downloaded my app. Does FCM keep the tokens either way? And if it does where does it store them? Unable to find them


Solution

  • AFAIK we can't retrieve the tokens or the data that FCM uses in its backend when we send a notification through the console. In a bare React Native project, the way is to save the token in a database (eg : Firestore). So when you need to send a notification you can grab the respective token to use it. Hope this is same for expo also. To summarise you'll have to store the token somewhere(also update it whenever it changes) to achieve your goal.