How can we help?
Hi, I have a question about integrating Firebase Cloud Messaging (FCM) and OneSignal.
Currently, I’m using the library @react-native-firebase/messaging to get an FCM token like this:
try {
await messaging().registerDeviceForRemoteMessages();
const token = await messaging().getToken();
console.log('FCM Token:', token);
} catch (error) {
console.log('Error getting FCM token:', error);
}
This gives me a token in the format like:
fXZO54XETHei-rgFRInOf8:APA91bG2b9mAlQpqBkl2Qv5wUyJsf6EGOaok8xMT8YMm30USOtocIUlvo4uE-lWFD9XbNOfmQeOR2-0OCku6Wa-vdp0q8MkgxNt6DQyMWra-kzOHhnRb658
My question is:
👉 How can I get a similar FCM token from OneSignal so that I can use Firebase to send notifications directly with that token?
In other words, can OneSignal provide me an FCM token like the one above?
Code of Conduct
How can we help?
Hi, I have a question about integrating Firebase Cloud Messaging (FCM) and OneSignal.
Currently, I’m using the library
@react-native-firebase/messagingto get an FCM token like this:This gives me a token in the format like:
My question is:
👉 How can I get a similar FCM token from OneSignal so that I can use Firebase to send notifications directly with that token?
In other words, can OneSignal provide me an FCM token like the one above?
Code of Conduct