Novu changelog
Chat and Push tokens in Trigger Payload
![changelog cover](/_next/image?url=https%3A%2F%2Fuploads.productlane.com%2F193235a3cba9ff67b91168395371445d.png&w=3840&q=75)
You can now pass your push
and chat
tokens directly from novu.trigger
endpoint. This eliminates the need for a separate process to keep push tokens in sync with Novu.
This behavior aligns with how email
and phone
fields can be passed during the trigger phase.
novu.trigger('workflow-id', {
to: {
subscriberId: 'subscriber-id',
channels: [
{
providerId: 'fcm',
credentials: {
deviceTokens: ['token-1'],
},
},
],
},
payload: {},
});
Our API will upsert those credentials on the subscriber entity and use them for delivery.