Open cgmleadtech opened 1 year ago
@cgmleadtech Thank you for reaching out! I am not able to reproduce this can you clarify what you mean by "it doesn't work"
Hi @emawby , so basically when I do the login with a revenuecat ID the external ID is not being set at all
await OneSignal.login(revenueCatUserID);
revenueCatUserID is not null, obviously hahaha
I'm facing same issue. not setting external ID for both Android and iOS.
@sharad-paghadal Thank you for the log that is helpful. Unfortunately I am not able to reproduce this but I will keep investigating. Does your app have identity verification enabled?
thank you @emawby , that was the issue. Just turned off identity verification and everything is working!!
@emawby I do not have identity verification enabled, and if I add as external id any kind of string, not just the revenuecatid, it does not work users still appears as:
@emawby thank you for the tip! I have faced the same Problem, turned the identity verification to disable, with solved my issue. It's nice to see, that there are no hints on the documentation.
@cgmleadtech, it seems you're using both OneSignal and RevenueCat. So am I (for an unreleased Flutter app). But for the integration to work, according to RevenueCat's documentation, the app needs to send $onesignalId to RevenueCat's user attributes:
But I can't find a way to get the OneSignal ID in v.5.0.3.
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?
How are you integrating OneSignal and RevenueCat if you're not using the OneSignal ID?
Thanks :)
@cgmleadtech, it seems you're using both OneSignal and RevenueCat. So am I (for an unreleased Flutter app). But for the integration to work, according to RevenueCat's documentation, the app needs to send $onesignalId to RevenueCat's user attributes:
But I can't find a way to get the OneSignal ID in v.5.0.3.
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?
How are you integrating OneSignal and RevenueCat if you're not using the OneSignal ID?
Thanks :)
I think you can read the migration guide and that actually the push subscription.id is what you are looking for but mayb I'm wrong
@emawby could you clarify this?
Identity verification is not yet supported and still in development. @RicBau2610: you're right, this limitation should be clear in documentation. We will work on updating all our docs.
@jmmdk and @cgutierr-zgz: the OneSignal ID can be retrieved via our REST API or our Server SDKs using the
The OneSignal ID is different from the Push Subscription ID.
We see the need to be able to get the OneSignal ID from the SDK, and will be adding a getter.
@cgmleadtech, I am also not able to reproduce. Is this is only happening on iOS?
login
is called?OneSignal.Debug.setLogLevel(LogLevel.Verbose)
BEFORE you call OneSignal.initialize(APP_ID)
and share logs from the time you call login
?@nan-li, thanks for your response.
However, I just got a response to my message to your support and they say that we should simply send RevenueCat the Subscription ID instead of the OneSignal ID (contrary to the RC docs).
So is support wrong and the docs are correct? If so, that means that we can't actually integrate with RC because you don't have a getter for that OneSignal ID? We don't use the REST API/server SDK. And if that's true, how fast can you add that getter? We really need that ASAP.
We see the need to be able to get the OneSignal ID from the SDK, and will be adding a getter.
Yeah I think you really just need a getter because I can already read the onesignalId from the debug prints so I guess it's there?
D/OneSignal(30889): [Thread-41] OperationRepo.enqueueAndWait(operation: {"name":"refresh-user","appId":"049c6e09-dea1-4649-84f9-c695a********","onesignalId":"a7ef6ff9-9b4b-4121-aa21-c0b7*******"}, force: true)
Any updates on this topic?
Hi, is there any update on the OneSignal ID getter?
i think if you are all only want to get the Onesignal ID, you just use this
OneSignal.User.pushSubscription.id
@nan-li @emawby
I was facing the same issue. in my case, my external ID (ex: 46644) has more than 200 subscriptions. I used rest api to set exteranl ID to subscription, the response says "meta":{"user_subscription_limit":200}}
but OneSignal.login(46644) with sdk didn't return any error message.
I deleted all subscriptions linked with my external ID then it works.
In my case, OneSignal.login(session.user.id);
doesn't work on iOS, but OneSignal.login("${session.user.id}");
works fine, and external_id is set correctly.
Hi everyone, I apologize for the delayed response. If you are managing at the user-level rather than device-level (which is what the subscription ID effectively does), please use the OneSignal ID as the identifier.
The get method was added in Release 5.1.3.
Hi @chaos128, the login
method itself will not return an error, but logs should show the error response once the request is made to the OneSignal server.
Hi @tamamura3, the login
method requires a string for the external ID passed in. It appears session.user.id
itself is not a string and needed to be stringified?
Hm I also have an issue that externalId
is not set up properly and I am receiving such an error.
I don't use aliases 🤔
Package version: 5.2.2
EDIT: I found a separate thread for my issue https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/714
Hello Everyone, Finally We have fixed with @SabirHalil In ios when user not accepted notification and one signal permission and you request for login that time it not set external id you must be sure to user accepted permission than login and it will works fine
OneSignal.Notifications.addPermissionObserver((state) { print("Has permission " + state.toString()); if (state) { print("Has permission Accepted" + state.toString()); setUserExternalId(); } }); you can use like that and it will works.
What happened?
In iOS I'm logging a user with a certain Id and the external id is not being placed in OneSignal
Steps to reproduce?
What did you expect to happen?
I would have expected the external id worked
OneSignal Flutter SDK version
5.0.2
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct