[OneSignal Plugin] Sending a push motification to a specific user is not working and no errors thrown
Question
Forge component by OutSystems R&D
Application Type
Mobile
Service Studio Version
11.10.18 (Build 41211)
Platform Version
11.11.0 (Build 26942)

Hi all,

At this moment I am developing a proof of concept for sending push notifications with OneSignal. Sending a push notification to all users is going correctly but sending a push notification to a specific user is not working and no errors are thrown. Hope anyone can help and sees what is going wrong.

One thing I am noticing is that the external user id in OneSignal is empty but I am not sure if this is needed to work correctly?


When debugging (see screenshots below) everything seems to be fine? All values are set and eventually the SendPushNotificationToUserId gives a Success = true.


I attached my application so you can take a look at my implemented code.


Thanks in advance!

Best regards,

Bart

PoCPushNotifications.oml

Hi Bart,

Good morning!

Can you please check if the "Recipients" value is also equal to true? My objective is that to verify if the message was successfully created at the side of OneSignal.

Thank you and kind regards..

Chris

Hi Christopher,

Thanks for your reply! I did also check the documentation and saw this one. I am not sure where to check this in OutSystems because when I am debugging I do not see a recipients option.  The server actions is only return a success or a error and in my case it gives back a success. Could you tell me where to check where to find the recipients option? 

Thanks!

Bart

Hi Bart,

My understanding it that you need to add it as part of the structure for the Response.

Try to use as well the Notifications Api via postman https://documentation.onesignal.com/reference/view-notifications to ensure that the message was created successfully.

Kind regards,

Chris

Hi Chris,

I'm one step further.

I did set the integration log level to full so I could check in service center. I do get a status 200 but if you check the last line of the http trace I am getting an error. I will try to check what I can do with that one.


The RegiserWithUser function form OneSignal also gives back a success = true.

The description says the following but not sure how the user ID  is associated since there is no user id going in?

Registers the device, associating it with a User Identifier, enabling it to receive push notifications.



EDIT:

Seems to be happening in the module of OneSignal


Hi Bart,

The last thing that I could think of rightnow is that the registered devices doesn't have a specific platform in OneSignal setup or App Id doesn't have subscribed devices.

Apologies I think this is all I could help.

Kind regards,


Chris

No problem. Thanks for your help! I think I am going to create a support ticket since this is a supported component.

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