self host
Hi There,
I am facing an issue with Subscribers: Dummy subscribers are getting created automatically.
I am creating subscribers with a custom subscriber ID(subscriberID in Novu= userId in my existing application) using the Subscriber End point
But now Subscribers for existing users are getting created automatically with dummy subscriberIds and same Email as existing users.
Please suggest a solution for this
10 Replies
Are you possibly doing a
.trigger({ to: { email: "<email>" } })
without also providing the subscriberId in there?@Saruchi
Could you please share the event trigger code snippet?
It is the default onefrom workflow
import { Novu } from '@novu/node';
const novu = new Novu('<API_KEY>');
novu.trigger('useraddedtorun', {
to: {
subscriberId: '<REPLACE_WITH_DATA>',
email: '<REPLACE_WITH_DATA>'
},
payload: {
runName: '<REPLACE_WITH_DATA>',
projectName: '<REPLACE_WITH_DATA>',
teamMember: '<REPLACE_WITH_DATA>',
teamName: '<REPLACE_WITH_DATA>',
userComment: '<REPLACE_WITH_DATA>',
link: '<REPLACE_WITH_DATA>'
}
});
I tried deleting all the dummy subscribers and then we started working on it (with SubscriberIDs as our own userIds)..after sometime I saw the dummy subscribers were created again.. We are only triggering Notifications through Workflows for now from Novu interface ..not using any API End points from backend
Are you using in-app notification center as well ?
yes
Novu's in app
If any random I'd is passed as subscriberId to NovuProvider. It will create that subscriber
I dont think we are providing any random ID. We create a subscriber using Post request with our App's UserId and Email and then trigger notifications for development purposes using Workflows in Novu interface
No we are not passing any random ID in place of subscriberID..
Always the App's userId which we use to create subscribers.. IS there anything else that can create dummy subscribers with same Email?
@Saruchi The default behavior of the notification-center component in Novu involves automatic subscription using the subscriberid specified in the
NovuProvider
component during rendering. You can verify this process by inspecting the network tab, where you'll observe the subscribe API being invoked from the frontend courtesy of the NovuProvider
, which handles this operation by default@San, you just advanced to level 3!
@Saruchi Did you double check in-app notification center NovuProvider?
Closing this due to inactivity. Feel free to open a new support post if needed