title: OneSignal Error: "app_id not found"
body: <p>I am getting this error whenever I try to post a notification with OneSignaL:</p>
  
  <pre><code>app_id not found. You may be missing a Content-Type: application/json header
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>function notifyUser(id, msg) {
      var notificationObj = { contents: {en: msg},
                              include_player_ids: [id],
                              'Content-Type': 'application/json' };
      window.plugins.OneSignal.postNotification(notificationObj,
        function(successResponse) {
          console.log("Notification Post Success:", successResponse);
        },
        function (failedResponse) {
          console.log("Notification Post Failed: ", failedResponse);
          alert("Notification Post Failed:\n" + JSON.stringify(failedResponse));
        }
      );
  };
  </code></pre>
  
  <p>I added the 'Content-Type' part because that's what the error says to do but I still get the same error.  This is the sample code striaght from their <a href="https://documentation.onesignal.com/docs/cordova-sdk#section--postnotification-" rel="nofollow noreferrer">docs</a> - They don't even include the Content-Type:</p>
  
  <pre><code>window.plugins.OneSignal.getIds(function(ids) {
    var notificationObj = { contents: {en: "message body"},
                            include_player_ids: [ids.userId]};
    window.plugins.OneSignal.postNotification(notificationObj,
      function(successResponse) {
        console.log("Notification Post Success:", successResponse);
      },
      function (failedResponse) {
        console.log("Notification Post Failed: ", failedResponse);
        alert("Notification Post Failed:\n" + JSON.stringify(failedResponse));
      }
    );
  });
  </code></pre>