0

My website uses GCM (via OneSignal) push notifications system. I have to migrate push notification system to FCM (Firebase). My goal is to migrate old tokens (and theirs relative tags/preferences) stored onto OneSignal into mine DB (on MongoDB) and send to that tokens my push notification via Firebase.

Reading Firebase's doc I don't understand if it is possible and how it is possible to reuse (or migrate/translate) old OneSignal tokens with Firebase.

Then:

  1. Is it possible to reuse old OneSignal token with Firebase?
  2. If n°1 is FALSE, how can I migrate old token to new token accessible with Firebase? Is there an API or JS method defined into Firebase SDK in order to translate old tokens.
AL.
  • 36,815
  • 10
  • 142
  • 281

1 Answers1

0

I'm not familiar with how OneSignal works with GCM/FCM. What you should do is verify if the token used for OneSignal is either different or same to the actual registration token GCM works on.

The usual token format for GCM/FCM is something like this: 123456abcd:123456789abcdefghij. For a list of known characters for a GCM/FCM registration token, see here.

If it is the same, then you could simply use them as they are while proceeding to use FCM. Since FCM is still compatible with GCM tokens. However, there seems to be a really old version of GCM tokens that may be considered different from the latest format of GCM/FCM tokens (see here).

If the token is different, then unfortunately, I don't think there is a way for you to import those tokens to FCM (similar post, but for parse.com tokens). You could ask the OneSignal team if they might have the corresponding GCM tokens, but I can't say for sure.

Disclaimer: I'm no way associated or representing OneSignal in any manner.

AL.
  • 36,815
  • 10
  • 142
  • 281