N
Novu12mo ago
Saruchi

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
Mei
Mei12mo ago
Are you possibly doing a .trigger({ to: { email: "<email>" } }) without also providing the subscriberId in there?
Pawan Jain
Pawan Jain12mo ago
@Saruchi Could you please share the event trigger code snippet?
Saruchi
SaruchiOP11mo ago
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
Pawan Jain
Pawan Jain11mo ago
Are you using in-app notification center as well ?
Saruchi
SaruchiOP11mo ago
yes Novu's in app
Pawan Jain
Pawan Jain11mo ago
If any random I'd is passed as subscriberId to NovuProvider. It will create that subscriber
Saruchi
SaruchiOP11mo ago
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?
San
San11mo ago
@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
Novu_Bot
Novu_Bot11mo ago
@San, you just advanced to level 3!
Pawan Jain
Pawan Jain10mo ago
@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
Want results from more Discord servers?
Add your server