N
Novu5w ago
MrLkn

Triggering Expo Push notification with Overrides configuration does not works

Hello everyone, I am trying to trigger push notification with Expo. Almost everything works however when I include custom configurations with the overrides I am not able to locate them. So basically my usage:
cls().novu.trigger(
name=notification.subject.replace("_", "-"),
recipients=notification.recipient.email,
payload=payload,
overrides={"badge": Notification.objects.filter(recipient=notification.recipient, is_seen=False).count()},
)
cls().novu.trigger(
name=notification.subject.replace("_", "-"),
recipients=notification.recipient.email,
payload=payload,
overrides={"badge": Notification.objects.filter(recipient=notification.recipient, is_seen=False).count()},
)
How it looks on Novu
curl -X POST 'https://api.novu.co/v1/events/trigger' \
-H 'Authorization: ApiKey NOVU_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "follow",
"to": {
"subscriberId": "[email protected]"
},
"payload": {
"notification_id": "1234",
"content": "1234",
"title": "1234",
"url": "1234",
"subject": "follow",
"language": "en",
"badge": 5
},
"overrides": {
"badge": 5
}
}'
curl -X POST 'https://api.novu.co/v1/events/trigger' \
-H 'Authorization: ApiKey NOVU_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "follow",
"to": {
"subscriberId": "[email protected]"
},
"payload": {
"notification_id": "1234",
"content": "1234",
"title": "1234",
"url": "1234",
"subject": "follow",
"language": "en",
"badge": 5
},
"overrides": {
"badge": 5
}
}'
And how it's received as a null attached in SS Any help is appreciated on how to use it because I do not see any other option then overrides (also included it in the payload itself btw) Documentation also says the same but with no example used. "The overrides field supports all Message Request values. An example of the same follows:"
Novu
Expo Push - Novu
Learn how to use the Expo push provider to send push notifications using Novu
No description
2 Replies
Pawan Jain
Pawan Jain4w ago
@MrLkn Could you try request like this
"overrides": {
"expo" : {
"badge": 5
}
}
"overrides": {
"expo" : {
"badge": 5
}
}
MrLkn
MrLknOP4w ago
Hey, I’ll try and let you know in few hours Hey it worked thank you so much, imho it would be super useful to add this to example on your readme
Want results from more Discord servers?
Add your server