N
Novu6mo ago
psrihariv

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
Prosper
Prosper6mo ago
@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: 'john@doemail.com', }, } ); 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 notifications
psrihariv
psrihariv6mo ago
Got it. Thank you!