title: How to add header in new Onesignal React-native
body: <pre><code> Error: {&quot;errors&quot;: [&quot;Please include a case-sensitive header of Authorization: Basic &lt;YOUR-REST-API-KEY-HERE&gt; with a valid REST API key.&quot;], &quot;reference&quot;: [&quot;https://documentation.onesignal.com/docs/accounts-and-keys#section-keys-ids&quot;]}
  </code></pre>
  <p><strong>I tried as below but error as given above</strong></p>
  <pre><code>sendNotification = async (data) =&gt; {
  
      const { userId } = await OneSignal.getDeviceState();
      const notificationObj = {
        contents: { en: &quot;Message Body&quot; },
        include_player_ids: [userId],
        Authorization: &quot;Basic APIKEY&quot;,
        headings: { en: 'You have new notification' },
        android_channel_id: 'id',
        template_id: 'id',
        buttons: [{ &quot;id&quot;: &quot;open_flat&quot;, &quot;text&quot;: &quot;OPEN HOSTING&quot;, &quot;icon&quot;: &quot;ic_menu_share&quot; }],
        include_external_user_ids: [&quot;13245-123455&quot;],
      };
  
      const jsonString = JSON.stringify(notificationObj);
  
      OneSignal.postNotification(jsonString, (success) =&gt; {
        console.log(&quot;Success:&quot;, success);
      }, (error) =&gt; {
        console.log(&quot;Error:&quot;, error);
      });
        };
  
      //Sending demo 
      useEffect(() =&gt; {
          sendNotification()
        })
  </code></pre>
  <p>I am getting the error :
  Error: {&quot;errors&quot;: [&quot;Please include a case-sensitive header of Authorization: Basic  with a valid REST API key.&quot;], &quot;reference&quot;: [&quot;https://documentation.onesignal.com/docs/accounts-and-keys#section-keys-ids&quot;]}</p>
  <p>Few months i tried to send notification with fetch with contenttype and Auth header</p>