NovuN
Novu14mo 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()},
            )

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": "sepil@me.com"
  },
  "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:"
image.png
Novu
Learn how to use the Expo push provider to send push notifications using Novu
Was this page helpful?