[PAID] ๐Ÿ› ๏ธ OneSignalPush : Send OneSignal push notifications, and receive them on this device.

OneSignalPush

[PAID] :heavy_dollar_sign: :hammer_and_wrench: OneSignalPush

Send OneSignal push notifications, and receive them on this device.

Open store


:clipboard: Extension specifications

Package in.sarthakdev.onesignalpush
Version 1.0
Price $7.99 USD
Category Tools
Updated 23 September 2026
Platforms MIT App Inventor, Kodular, Niotron, Android Builder, Thunkable
Built using FAST
Store OneSignalPush for App Inventor | SarthakDev.in

Paid buyers get this AIX by email after checkout. Import it from Projects โ†’ Import extension.

:open_book: About

Send OneSignal pushes from an admin app, and receive them on this device. Set AppId, connect the same Firebase project in the OneSignal dashboard, then call StartReceiving. Keep RestApiKey out of the app your users install.

:sparkles: Features

  • Receive on this device: subscribe, show a tray notification, and handle taps
  • Receiving uses the App ID only โ€” the REST API key stays out of the user app
  • Push to all, segments, External IDs, Subscription IDs, or tag filters
  • Schedule sends with send_after and cancel them before delivery
  • Delivery stats: successful, failed, errored, clicked, remaining
  • Create users, set/remove tags, get and delete users by External ID
  • Link this phone to an External ID so an admin app can target it
  • Android 13 notification permission, with messages queued while the app is closed
  • Works with new os_v2 App API keys and legacy REST keys
๐Ÿงฉ Blocks

OneSignalPush blocks

๐Ÿ”” Events

Notification Sent

Fired when OneSignal accepted a send or schedule. action is the method name. notificationId can be used with GetNotification or CancelNotification.

NotificationSent

  • action (text)
  • notificationId (text)
  • response (any)

Notification Cancelled

Fired when a scheduled notification was cancelled.

NotificationCancelled

  • notificationId (text)
  • response (text)

Got Notification

Fired with delivery stats from GetNotification. response is the full JSON as a dictionary.

GotNotification

  • notificationId (text)
  • successful (number)
  • failed (number)
  • errored (number)
  • converted (number)
  • remaining (number)
  • response (any)

User Updated

Fired after CreateUser, SetTags, RemoveTags or DeleteUser succeeds.

UserUpdated

  • action (text)
  • externalId (text)
  • response (any)

Got User

Fired with the result of GetUser.

GotUser

  • externalId (text)
  • tags (any)
  • subscriptionCount (number)
  • response (any)

Error Occurred

Fired when a request fails. action is the method name, statusCode is the HTTP status (0 for local errors such as missing keys or no internet).

ErrorOccurred

  • action (text)
  • statusCode (number)
  • message (text)

Subscribed

This device can receive pushes. subscriptionId is the OneSignal subscription id (use it with SendToSubscriptionIds). token is the Firebase token.

Subscribed

  • subscriptionId (text)
  • token (text)

Notification Received

A push arrived on this device. data is the extra key/value pairs. whileClosed is true when it arrived with no screen open and is delivered now.

NotificationReceived

  • notificationId (text)
  • title (text)
  • message (text)
  • data (any)
  • whileClosed (boolean)

Notification Opened

The user tapped a notification and the app opened. data is the extra key/value pairs.

NotificationOpened

  • notificationId (text)
  • title (text)
  • message (text)
  • data (any)

Permission Result

Result of RequestNotificationPermission.

PermissionResult

  • granted (boolean)
๐Ÿ”ง Methods

Send To All

Push to every subscribed device (the Total Subscriptions segment). data is an optional dictionary delivered with the notification; use an empty dictionary if you have none.

SendToAll

  • title (text)
  • message (text)
  • data (dictionary)

Send To Segments

Push to one or more OneSignal segments by name, for example Active Subscriptions or a segment you made in the dashboard.

SendToSegments

  • title (text)
  • message (text)
  • segments (list)
  • data (dictionary)

Send To External Ids

Push to specific users by the External ID you logged them in with (your own user ID, email, etc).

SendToExternalIds

  • title (text)
  • message (text)
  • externalIds (list)
  • data (dictionary)

Send To Subscription Ids

Push to specific devices by OneSignal Subscription ID (formerly Player ID).

SendToSubscriptionIds

  • title (text)
  • message (text)
  • subscriptionIds (list)
  • data (dictionary)

Send To Tag

Push to users whose tag matches. relation is one of = != > < exists not_exists. value is ignored for exists and not_exists.

SendToTag

  • title (text)
  • message (text)
  • key (text)
  • relation (text)
  • value (text)
  • data (dictionary)

Schedule To Segments

Schedule a push to segments for later. sendAfter is a date string OneSignal understands, for example 2026-09-24 10:00:00 GMT+0530. Cancel it with CancelNotification.

ScheduleToSegments

  • title (text)
  • message (text)
  • segments (list)
  • sendAfter (text)
  • data (dictionary)

Schedule To External Ids

Schedule a push to users by External ID for later. sendAfter format is the same as ScheduleToSegments.

ScheduleToExternalIds

  • title (text)
  • message (text)
  • externalIds (list)
  • sendAfter (text)
  • data (dictionary)

Send Custom

Send any OneSignal Create Message body as a dictionary (buttons, filters, delayed_option, etc). app_id is added for you if it is missing.

SendCustom

  • body (dictionary)

Cancel Notification

Cancel a scheduled notification that has not been delivered yet.

CancelNotification

  • notificationId (text)

Get Notification

Get delivery stats for a notification: successful, failed, errored, converted (clicked) and remaining.

GetNotification

  • notificationId (text)

Create User

Create a OneSignal user with this External ID and optional tags. If the user already exists OneSignal returns it.

CreateUser

  • externalId (text)
  • tags (dictionary)

Set Tags

Add or update tags on a user. Tag values are stored as text. Target them later with SendToTag.

SetTags

  • externalId (text)
  • tags (dictionary)

Remove Tags

Remove tags from a user by key.

RemoveTags

  • externalId (text)
  • keys (list)

Get User

Read a user: tags, subscriptions (devices) and the full JSON as a dictionary.

GetUser

  • externalId (text)

Delete User

Delete a user and all their subscriptions from OneSignal.

DeleteUser

  • externalId (text)

Start Receiving

Subscribe this device so it can receive pushes. Uses AppId plus FirebaseApiKey, FirebaseAppId and FirebaseProjectId. Does not use RestApiKey. Fires Subscribed.

StartReceiving

Start Receiving From Json

Subscribe this device from the full text of google-services.json. The file must contain an Android client whose package_name is this app's package. Connect that same Firebase project in the OneSignal dashboard (Settings, Google Android, FCM). Fires Subscribed.

StartReceivingFromJson

  • googleServicesJson (text)

Request Notification Permission

Ask for the Android 13+ notification permission, then update this device's OneSignal subscription. On older Android this returns granted right away. Fires PermissionResult.

RequestNotificationPermission

Notifications Enabled

True if this app is allowed to show notifications right now.

NotificationsEnabled

Stop Receiving

Stop this device from receiving pushes. The OneSignal subscription stays, with enabled set to false. Call StartReceiving to turn it back on.

StopReceiving

โš™๏ธ Properties

App Id

OneSignal App ID (Settings โ†’ Keys & IDs).

AppId

Type: text

Rest Api Key

OneSignal REST API key (Settings โ†’ Keys & IDs). Anyone who extracts it from your APK can push to all your users, so only ship it in apps you trust, like an admin app.

RestApiKey

Type: text

Android Channel Id

Android notification channel ID from OneSignal (Settings โ†’ Push โ†’ Android Notification Categories). Leave empty for the default channel.

AndroidChannelId

Type: text

Android Group

Android group key. Notifications with the same group are stacked together.

AndroidGroup

Type: text

Launch Url

URL opened when the notification is tapped. Leave empty to just open the app.

LaunchUrl

Type: text

Big Picture

Public https image URL shown as the expanded big picture.

BigPicture

Type: text

Large Icon

Public https image URL shown as the large icon on the right of the notification.

LargeIcon

Type: text

Small Icon

Name of a small icon drawable already inside the receiving app. Leave empty for the default.

SmallIcon

Type: text

Language

Language code for the title and message, for example en, hi, es. English is always included because OneSignal requires it.

Language

Type: text ยท Default: en

Time To Live

Seconds OneSignal keeps trying to deliver to offline devices. 0 uses the OneSignal default (3 days).

TimeToLive

Type: number ยท Default: 0

High Priority

Send with high priority so the device wakes up and shows it right away. Default true.

HighPriority

Type: boolean ยท Default: true

External Id

Your user id for this device. When set, StartReceiving links the phone to this External ID so an admin app can use SendToExternalIds. Leave empty to subscribe anonymously.

ExternalId

Type: text

User Jwt

Only if this OneSignal app has Identity Verification turned on. A JWT from your server for ExternalId. Leave empty otherwise. Never put the REST API key here.

UserJwt

Type: text

Firebase Api Key

Firebase web API key (google-services.json client > api_key > current_key). Required to receive. Starts with AIza.

FirebaseApiKey

Type: text

Firebase App Id

Firebase Android app id (google-services.json mobilesdk_app_id), like 1:123:android:abc. The Firebase Android package must be this app's package name.

FirebaseAppId

Type: text

Firebase Project Id

Firebase project id (google-services.json project_info > project_id). The same Firebase project must be connected in the OneSignal dashboard under Google Android (FCM).

FirebaseProjectId

Type: text

Firebase Sender Id

Optional Firebase project number (project_info > project_number). Read from FirebaseAppId when blank.

FirebaseSenderId

Type: text

Auto Start Receiving

After Screen.Initialize, subscribe this device when AppId and the Firebase keys are already set. Default true.

AutoStartReceiving

Type: boolean ยท Default: true

Show Notification When Open

Show a tray notification while this app is open. NotificationReceived fires either way. Default true.

ShowNotificationWhenOpen

Type: boolean ยท Default: true

Channel Name

Name of the notification channel shown in Android settings (Android 8+).

ChannelName

Type: text ยท Default: Notifications

Subscription Id

OneSignal subscription id for this device, after Subscribed. Use it with SendToSubscriptionIds.

SubscriptionId

Type: text

Push Token

FCM token for this device, or empty until StartReceiving.

PushToken

Type: text


:shopping_cart: Get the AIX

Paid extension. Buy it on the store, then import from Projects โ†’ Import extension.


Built by Sarthak Gupta ยท hi@sarthakdev.in ยท sarthakdev.in

Could you please show some example blocks?

1 Like

Sure! Adding now :slight_smile: