13
Views
3
Comments
[OneSignal Plugin] OneSignal API not available on ODC
Question
OneSignal Plugin
Forge asset by OutSystems

Hey I'm trying to use this plugin for my mobile application. I have all the client stuff set up, but don't see anything for server actions. The documentation provided tells you to add the OneSignalAPI as part of your dependencies but that isn't an option in ODC. I tried searching the forge for this as well and couldn't find anything. Any ideas? Or is this just not ready for ODC yet?

2025-08-07 06-30-56
Amit J
Champion

I'm not sure ONesignal plugin fully suporting in ODC or not but possible Workarounds to Use OneSignal in ODC

1. Use OneSignal's REST API for Server-Side Actions

Since the OneSignalAPI module is missing in ODC, you can directly call OneSignal's REST API to send notifications from your server actions.

Steps to implement:

  1. Go to the OneSignal REST API Documentation: OneSignal API Docs

  2. In ODC, create a REST API integration and configure the following request:

    Endpoint:

    bashCopyEditPOST https://onesignal.com/api/v1/notifications

    Headers:

    jsonCopyEdit{   "Content-Type": "application/json",   "Authorization": "Basic YOUR_REST_API_KEY"}

    Body Example (Sending Push Notification):

    jsonCopyEdit{    "app_id": "YOUR_ONESIGNAL_APP_ID",    "included_segments": ["All"],    "headings": {"en": "Test Notification"},    "contents": {"en": "This is a test push from ODC."}}

  3. Use this REST API call inside your ODC server action to send push notifications.

2. Use OneSignal SDK for Client-Side Implementation (JavaScript)

If your app only needs client-side push notifications, you can integrate OneSignal's JavaScript SDK in ODC.

Steps to implement:

  1. Add the following JavaScript to your mobile app's startup script:

    javascriptCopyEditOneSignal.push(function() {    OneSignal.init({        appId: "YOUR_ONESIGNAL_APP_ID",        safari_web_id: "YOUR_SAFARI_WEB_ID", // Optional for Safari support        notifyButton: { enable: true }    });});

  2. Use event listeners to handle push notifications:

    javascriptCopyEditOneSignal.on('notificationDisplay', function(event) {    console.log("Notification displayed:", event);});

UserImage.jpg
Spencer Buhler

Ya I started messing around with the REST API and just writing my own server actions, looks like that may be what I have to do. Not sure why it is missing on ODC. 

2019-01-07 16-04-16
Siya
 
MVP

@Spencer Buhler : This is an OutSystems supported component and hence you may create a support ticket. Meanwhile, someone used this component in ODC may be able to assist.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.