var FCM = require('fcm-node');

// Configure proxy settings
var proxyUrl = 'https://serverswg.sbi.co.in:9090';

var serverKey = 'drfghjgytfd23ertyuxcvbnb34567gfdfg345676'; //put your server key here
var fcm = new FCM(serverKey,proxyUrl);

var message = {
    registration_ids: 'dPFdSzWjQIeGMhYGh4oGMu:APA91bG5KwW7r2N5Noah_3GYQyNBcbw7ucID1nNfxdKHux4SB47f3h9sMPan_k2k863a-6ORi-Ba0KGwl9EZuFUT-nHM2TxkG_1KfBnDR-3126WRXk4ny7solhpFluCFvf-Y-6ZIw-_Z',
    collapse_key: 'your_collapse_key',
    priority: "high",
    content_available: true,
    notification: {
        title: 'Title of your push notification',
        body: 'Body of your push notification'
    },
    data: {
        my_key: 'my value',
        my_another_key: 'my another value'
    }
};

fcm.send(message, function(err, response) {
    if (err) {
        console.log("Something has gone wrong!", err);
    } else {
        console.log("Successfully sent with response: ", response);
    }
});
