Push-webhook newbie question/confusion
So when we set credentials for the user for push-webhook using the following
// PushProviderIdEnum.PushWebhook = push-webhook
await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.PushWebhook, {
deviceTokens: ['ANY_RANDOM_STRING'],
});
Does this register the subscriber for the all push-webhooks present in the integrations stores? Also, how do I trigger notification across only one specific push-webhook integrations I have created. Please help!
2 Replies
@psrihariv It registers the subscriber for only the push webhook provider you activated in the integration store.
You can trigger notification via the normal way to trigger code.
await novu.trigger('<WORKFLOW_TRIGGER_ID>',
{
to: {
subscriberId: '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
email: '[email protected]',
},
}
);
If you have a specific push-webhook integration and you mark it as the primary one on the dashboard, then novu automatically uses that when you trigger the notificationsGot it. Thank you!