Probleme Onesignal id

Hello community,

I’m experiencing an issue with OneSignal in Thunkable. I’m trying to send a personalized notification to my app users based on variables stored in Firebase. The problem is that the configuration of my block to retrieve the OneSignal ID, which is set during user login, is returning the subscription ID instead of the user ID. I would like some help understanding how to get the user ID so I can send notifications to users based on certain conditions.

Thank you for your help.

Hi seb.falletv5ko1n, welcome to Thunkable! :tada:

Be sure to check out How to ask Great Questions v2.0, the Community Guidelines, and our Getting Started Guide to make the best of your Thunkable Community experience!

Ideally, we’d need to see some blocks for how you have this set up to be able to help more.

I would look into the One Signal API here. You need the One Signal device Id to send push notifications to certain users.

Thank you very much for your answers :blush:, my problem is solved. I wanted to send push notifications from a .js file, and I thought I would have to retrieve the user ID instead of the subscription ID. Fortunately, with the subscription ID my code works and sends notifications to the user based on variables stored in Firebase.

Thanks again for your responses. If you know how to delete users database when user deletes their account, I would appreciate the solution :blush:

1 Like