vasani-arpit / Firebase-Push-Notification-Sever

A tiny minimal firebase push notification sender
1 stars 2 forks source link

Group notifications #1

Open Zibri opened 6 years ago

Zibri commented 6 years ago

I have notice that the IID FCM/GCM server needs a token to subscribe the user to a group.

Do you have any idea how to get the token without loading all the firebase bloatware js libraries?

vasani-arpit commented 6 years ago

Are you talking about device token?

Zibri commented 6 years ago

I am not talking about the token that includes the endpoint, but the token returned from messaging.getToken()

Zibri commented 6 years ago

This is the subscription:

subscription=await (await navigator.serviceWorker.getRegistration()).pushManager.getSubscription() and this is the token returned by firebase:

token=await firebase.messaging().getToken() How I can I get that token without using firebase javascript libraries? (but using firebase service with my api key) ?