title: Send notifications using REST api
body: <p>I want to use the http package to send notifications to topics through the flutter app using the docs as in <a href="https://firebase.google.com/docs/cloud-messaging/send-message#send-messages-to-topics" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/send-message#send-messages-to-topics</a></p>
  <pre><code>POST https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send HTTP/1.1
  
  Content-Type: application/json
  Authorization: Bearer ya29.ElqKBGN2Ri_Uz...HnS_uNreA
  {
    &quot;message&quot;:{
      &quot;topic&quot; : &quot;foo-bar&quot;,
      &quot;notification&quot; : {
        &quot;body&quot; : &quot;This is a Firebase Cloud Messaging Topic Message!&quot;,
        &quot;title&quot; : &quot;FCM Message&quot;
        }
     }
  }
  </code></pre>
  <p>Since it requires Access Token which expires every hour. How do I manage it in flutter?</p>