How can I subscribe to GCM and get the Registration Id so that I can send it to Microsoft Azure to manage the push notifications?

Hello Filipe,

Check if the steps on this documentation work. The 1st part is all about configuring GCM to allow sending push notifications to android.


Hello Rodrigo,

Thanks for reaching out.

We've checked that doc, but it doesn't solve our problem. We have everything configured with Firebase but is the after configuration that we need.

Basically, we need the equivalent to this 

Any pointers? 

Just to make sure I've understood correctly: You have everything configured on the FCM side, now you want to send messages to your devices. Is that it?

If this is the case, and you want to do it the hard way, I think you need to look at the HTTP or XMPP API. I haven't tried it before, so I don't know how easy or hard it is...

But if you want to send notifications, why not use the oneSignal plugin? Doesn't it do what you need?


We are using Microsoft Azure Notification Hub to manage our push notifications. We got the iOS notifications working properly and is already subscribing to the Azure Notification Hub.

However, with android and we need the Registration Id to be able to subscribe the device to the Azure, like so:

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="">
    <content type="application/xml">
        <GcmRegistrationDescription xmlns:i="" xmlns="">
            <Tags>myTag, myOtherTag</Tags>
            <GcmRegistrationId>{GCM Registration Id}</GcmRegistrationId> 

(source: )

For what I am concluding is that I will need to use Firebase javascript client: 

and get the Registration ID by like this:

For Azure Notification Hub, what I found was this: Sending push notifications to Android with Azure Notification Hubs. (There's a link in the article if you're using FCM instead of GCM).

Does it help?


That is indeed what we are trying to build, except to instead of using Android, we are using Outsystems.
We have built an Azure plugin and uploaded to the Forge to wrap Cordova and make the subscriptions and everything with Azure.

However, now, we need to be able to find the Registration Id, we decided to use javascript to get it.

This seems sketchy but hope to work, I'll updated this thread afterwards.