Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]: When using the 5.x.x API how to make background notifications work even when notifications are disabled for my app. #1907

Closed
1 task done
stefan-tkii opened this issue Nov 10, 2023 · 1 comment

Comments

@stefan-tkii
Copy link

stefan-tkii commented Nov 10, 2023

How can we help?

So far I have been using OneSignal version 4.8.6 for my app. And I had made use of the API defined here: https://documentation.onesignal.com/v9.0/docs/sdk-reference#unsubscribewhennotificationsaredisabled-method for enabling notifications to work even when the permission for them was disabled. I was reading the documentation about the new 5.x.x API but could not find the corresponding API for this same functionality.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jennantilla
Copy link
Contributor

Hello there!

We are looking at adding this capability to our API, but currently, the workaround is to create a 2nd OneSignal app to register the push tokens. You can get the token with this method even if the user did not accept notifications.

Then, use the OneSignal Create Subscription REST API call to register the device to your secondary OneSignal app_id for your silent notifications.

Hope this helps! Let us know if you have any additional questions or concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants