-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug]: Having issue with external ids for specific user targeted notification #82
Comments
I have the same problem on
I get the same issue:
|
I reproduced it when the external_id I provided has multiple subscriptions, some of which are invalid or opted out. Here is a snippet from our Create Notification REST API describing sample responses when using Does this clarify the responses you are seeing? // If an "id" is provided, then at least 1 subscription was sent the message.
// First "external_id" reference is to the Idempotent Key: https://documentation.onesignal.com/docs/idempotent-notification-requests
// "invalid_aliases" correspond to how many subscriptions for the user are opted-out of receiving messages for this channel.
// In this example, at least 1 subscription was sent the message and the user with this "external_id" had 3 opted-out subscriptions.
{
"id": "bfc9ea0a-8488-441d-9208-7154794d426a",
"external_id": null,
"errors": {
"invalid_aliases": {
"external_id": [
"123456789",
"123456789",
"123456789"
]
}
}
}
// If an "id" is not provided, then the user has no subscriptions opted-in to receive messages for the channel.
// In this example, the user has 2 subscriptions for this channel and both are opted-out from receiving messages.
{
"id": "",
"errors": {
"invalid_aliases": {
"external_id": [
"123456789",
"123456789"
]
}
}
} |
That seems like a pretty complex for what should be a drop in replacement for the old external_id property in the v2 library. Why can't it behave the same way? I specify external id or ids, and I want the notification to be registered. Whatever subscriptions may or may not be registered with the external id should not be relevant. |
Hi @jpike88, you can just check for the Using the previous |
It's an empty string, so I don't know how to interpret that.
Where's the test suite that would have picked this up? That seems like a common case. |
That means no notifications were created and it could be due to any of these reasons:
Can you confirm that user with an external ID of You can also try hitting our Create Notification endpoint directly: https://documentation.onesignal.com/reference/create-notification.
Unclear word choice on my part, the reproduction is expected. If a user with external ID of |
What happened?
I'm using node Js to trigger notifications using external Ids even though the notifications are getting triggered for all users.
I'm facing issues when triggering device specific notification
Steps to reproduce?
What did you expect to happen?
I expected that the notifications will be shown only in the target devices which have logged into oneSignal with custom Id.
For e.g. OneSignal.login('custom_id')
Relevant log output
CreateNotificationSuccessResponse { id: 'ae3093eb-3bda-41a3-b67d-b0281991a08b', external_id: null, errors: { invalid_aliases: { external_id: [Array] } } }
Code of Conduct
The text was updated successfully, but these errors were encountered: