Expo device token in the trigger payload
I have a use case where one subscriber may have two different expo tokens intended for two different apps.
In order to ensure that the right notification reaches the intended app, instead of setting the expo token in the user credentials, I am sending the token in the trigger payload based on the type of notification to be sent.
However, I have observed that every time I invoke the trigger API with the expo token in the payload, it also saves it against the subscriber id.
To work around this, I also invoke the API to clear the credentials.
However, I noticed that the step fails often with the error
Subscriber credentials is missing the tokens for sending a push notification message
Am I doing this right or is there a better way to handle this?
Novu: Self-hosted, v2.1.04 Replies
@Pallab
Can you please share the request payload?
Here's how the payload is sent.
In the step execution, I get to see this.
@Pallab
However, I have observed that every time I invoke the trigger API with the expo token in the payload, it also saves it against the subscriber id.yes, it is the intended behaviour, subscriber data is upserted
To work around this, I also invoke the API to clear the credentials.Why you are removing those tokens? Novu requires token to send push notifications to @Pallab Do you need more help in this?
I changed the design to create separate subscribers for the intended action. We are good for now.
Appreciate the response! 🙏