Doubt regarding notifications to specific user

Specific user notification
I followed this tutorial for setting up this feature in my app but the first step was’nt clear for me, so I followed This tutorial by @drted but somehow it isn’t working right for me. I wanted to know if in the tutorial by @drted we need to set up something in the web api block apart from the code, it tried various ways of debugging and once when I tried it ,it gave me an alert which was to be shown for an error with the right messages. What should I do to correct this ? Pls help (also attaching the code).

1 Like

Have you tried it from the Onesignal console directly?
First establish the fact that it works independently then you go to Thunkable platform.

Your App should be tested from the mobile.

In your test app, put a label to show the notification user ID. If this is not obtained, the operation fails

You might also consider capturing the response and displaying that as well. Perhaps the response will indicate the issue.


I did send notification directly from onesignal and that did work

1 Like

Yeah, I will try that one

Good. One issue out of the way,
See that the notification user ID is actually supplying the onesignal user ID by showing it in a label before calling the Web API


If this is not giving you the user ID the operation will not work.

1 Like

Okay, I’ll try both

1 Like

I tried doing what @drted asked to do and this is the response I am getting


You mean to say that the component Text_Inputofchecklist is empty. You can always check that the message field has some value before issuing the Web API request.

1 Like

I tried with text in the text input and I am getting an in app notification instead of the usual one and the response , error and status is different right now

1 Like

Great job.

Status of 200 means success. Only check the error block if status is NOT 200

So this is meant to give an in-app notification? I wanted it to give the casual notification

Why is the external id giving a null value, does external id mean app id?

1 Like

External ID is an ID that you assign and bind it to the player_id generated by Onesignal.

I want to know if this code is for an in app notification or not? and how to get the external id filled with some value,
Thanks in advance for tolerating my too many doubts

1 Like

Dear @smartnst.tech9d ,

You said you tried the push notification from the OneSignal console from your computer to your mobile device. This is enough to show that this solution is for push notification as it name suggests and not in-app notification.

However, when you call the service from your app you will of course receive it in your app.

The easiest scenario for the good implementation of external ID is:

Suppose you have an app utilizing the Firebase authentication using email address of the user and you have a user who accessed your app from the mobile and from a tablet.

In effect, the user is using your app with a single account but from two different devices. Now, knowing that OneSignal uses a player ID per device you can foresee a problem of where to send the notification as the same user has to different devices.

In this case, the OneSignal service allows the use of external ID with which both devices will have the same external ID (in this case, could be the internally generated user ID by Firebase) so that when a notification is to be sent to this external ID, OneSignal will send it to both devices.

Hope that clarifies the issue and happy Thunking.

Thanks a lot for clearing that one more last doubt where do I find the external id or is there any way I can call the external id?