OneSignal requesting URL with APP_ID from the SDK?

1

I am using the code of OneSignal and I am not able to subscribe users, because when accepting, it gives a A bad HTTP response code (403) was received when fetching the script. error. It will fetch the file OneSignalSDKWorker.js but still it asks for my APP_ID together, even if it does not specify that request, that is, it requests /OneSignalSDKWorker.js?appId=A_MINHA_APP_ID .

Here is the code

<link rel="manifest" href="/manifest.json" />
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js"async=""></script>
<script>
  var OneSignal = window.OneSignal || [];
  OneSignal.push(function() {
    OneSignal.init({
      appId: "A_MINHA_APP_ID",
    });
  });
</script>
    
asked by anonymous 16.04.2018 / 17:25

1 answer

0

In the OneSignal doc, the call to this is different:

link

var OneSignal = OneSignal || [];

OneSignal.push(["init", {
  appId: "YOUR_APP_ID",
  // Your other init settings
}]);

Note that this goes from version to version, I've had problems with this for a stupid detail that they have changed and all my apps stop working the push.

    
30.04.2018 / 21:55