Firebase FCM error: 'InvalidRegistration' : <p>I am currently trying to send a <code>PushNotification</code> to a <code>Device Group</code> using <code>FCM</code> with the help of <code>Firebase Cloud Functions</code> but once the notification is sent, it returns with code <code>200</code> but with failure :</p>

<pre><code>SUCCESS response= {
multicast_id: 8834986220110966000,
success: 0,
failure: 1,
canonical_ids: 0,
results: [ { error: 'InvalidRegistration' } ] 
}
</code></pre>

<p>Here is the code I am using to send this notification... what am I missing?</p>

<pre><code>const options = {
    method: 'POST',
    uri: 'https://fcm.googleapis.com/fcm/send',
    headers: {
       'Authorization': 'key=' + serverKey,
    },
    body: {
       to: groupId,
       data: {
        subject: message
       },
       notification: {
         title: title,
         body: body,
         badge: 1,
        },
       content_available: true
    },
    json: true
};

return rqstProm(options)
    .then((parsedBody) =&gt; {
        console.log('SUCCESS response=', parsedBody);
    })
    .catch((err) =&gt; {
        console.log('FAILED err=', err);
    });
</code></pre>

<p>Where JSON values <code>title</code>, <code>body</code>, <code>subject</code>, <code>message</code> are <code>String</code></p>
