title: FCm error=MissingRegistration on push notification in reactjs?
body: <p>I am sending a notification with FCM using <a href="https://fcm.googleapis.com/fcm/send" rel="nofollow noreferrer">https://fcm.googleapis.com/fcm/send</a> POST request.
  The problem is that the API is working great on postman but didn't work on react code. the error it throughs on the frontend is:</p>
  <blockquote>
  <p>Error=MissingRegistration</p>
  </blockquote>
  <p>I had searched the issue and found <a href="https://stackoverflow.com/questions/22486192/gcm-error-missingregistration-sending-messages-via-json">helping question</a> in StackOverflow. it says that the problem is with the header</p>
  <blockquote>
  <p>content-type: application/JSON</p>
  </blockquote>
  <p>but my request body is</p>
  <pre><code>    const fetchOptions = {
        method: &quot;POST&quot;,
        headers: {
          &quot;Content-Type&quot;: &quot;application/json&quot;,
          Authorization:
            &quot;key=AAAAk9_cbfE:APA91bEOE-IlX4ieDnR8KZKxXPAeQN0gEu0YRPidvRgM5Aggq7gE2oKTogPVWo8WaH3oJH9lxTXnCnNnSw0iALKXXDLg_8jUs6RnKeOyt8ldHmAjgAVMJ2HN40Vo_Ztateg7sHNc5HJu&quot;,
        },
        body: {
          collapse_key: &quot;type_a&quot;,
          notification: {
            body: &quot;Body of Your Notification&quot;,
            title: &quot;Title of Your Notification&quot;,
          },
          data: {
            body: &quot;Body of Your Notification in Data&quot;,
            title: &quot;Title of Your Notification in Title&quot;,
          },
          to: &quot;d38xitfjWwRPBCId31TaW_:APA91bHyIbSPxmTha_n6t6T8JBRifDrHnf-Hz2ObbY36qhObeG4vq-y9zAvn-12ubF-rvPnkKGDw_kau9p2igY2aJHAvwqPeNJsdGjHO31i5nHhlqnnCs1lwXUD5EcRXMzDFhMcDjMWn&quot;,
        },
      };
  
  </code></pre>
  <p>that is also JSON type and I have the content-type: application/JSON in my header. I am unable to locate the problem kindly do me a favor don't devote my question because I am recently unbanned from being asked questions. thanks</p>