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

How to get the Onesignal ID on the last version? #782

Closed
1 task done
rignaneseleo opened this issue Nov 1, 2023 · 2 comments
Closed
1 task done

How to get the Onesignal ID on the last version? #782

rignaneseleo opened this issue Nov 1, 2023 · 2 comments

Comments

@rignaneseleo
Copy link

rignaneseleo commented Nov 1, 2023

I am trying to get the Onesignal ID to configure RevenueCat via setOnesignalID(String onesignalID)

Onesignal ID was previously available in v3.x.x but now only the subscription ID and the token are available from the Onesignal.User.pushSubscription.id property.

How can I get it?

Code of Conduct

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

nan-li commented Nov 1, 2023

Hi @rignaneseleo,
Thanks for asking, this was also asked by others, please see this response.

You will have to use the REST API or Server SDK, but we are going to add a getter for onesignal ID.

@nan-li nan-li closed this as completed Nov 1, 2023
@MuhammedRefaat
Copy link

OneSignal id can be retrieved using:

String? oneSignalId = await OneSignal.User.getOnesignalId();

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

3 participants