Comment to 'I can't add code in Studio-Designer-Injections.'
  • Hi @LeonidS @PavelS

    After clearing my browsing data (which I've always done), the subscription worked; that is, the pop-up window appeared asking if I wanted to subscribe to notifications. It's worth mentioning that I agreed to subscribe to notifications, then clicked "Allow" in the pop-up window. But the welcome notification never appears, even though I configured "Send welcome notification after subscribing" in OneSignal.

    At this point, the only thing I had configured was the OneSignal App ID in Studio-Settings-Push.

    However, the OneSignal dashboard showed that I had only subscribed via email.

    So I added the OneSignalSDKWorker.js file to the root directory of my website, cleared my browsing data again, and went back to https://trabajoar.ar. This time, after agreeing to receive notifications, the OneSignal dashboard showed two subscriptions: one via email and one via push notifications. I don't know if there's a connection or if it was just a coincidence.

    That's as far as I got. I tried sending a test push notification from OneSignal, and I sent it, but it's not arriving.

    In Studio-Settings-Push, I didn't enter anything in "REST API Key" because I'm not sure how to get this information. I assume I need to add a key (screenshot attached), but it says there that it shouldn't be exposed, so I don't understand. When I add a key, a very long string is automatically generated. I'm not sure if that string is the REST API key or if I should use a different string called "key id".

    image_transcoder.php?o=sys_images_editor&h=2943&dpx=1&t=1763654688

    Thank you very much.

    • Hello @Claudio Acosta The REST API Key must remain secret — that’s why OneSignal warns you not to expose it publicly. But that does NOT mean you shouldn’t enter it anywhere.

      The key you created should be placed in: Studio → OneSignal → REST API Key ----- It's exactly the one you created according to the screenshot you sent.

      Previously, OneSignal only registered your email subscription because the REST API Key wasn’t configured as dear @LeonidS mentioned.

      But do NOT share your REST API Key anywhere publicly!!!

      • Hi @PavelS

        I added the REST API key in Studio > Settings > Push.

        Now both subscriptions appear in OneSignal (email and push).

        What I still can't get working is for a test push notification to arrive.

        image_transcoder.php?o=sys_images_editor&h=2944&dpx=1&t=1763682639

        image_transcoder.php?o=sys_images_editor&h=2945&dpx=1&t=1763682652

        Thank you so much for your help.