push notification reliability?


#1

I’ve implemented push notifications on my server side for events that should trigger push notifications.

The push notifications are successfully sent to the api and i get a 200 response. Despite this, it seems that quite often the recipient is not receiving the push notification.

I know we have permission to send notifications because later on if i send a manual test of push notifications to the same user, he receives the notifications.

What are scenarios where the push service responds with 200 success when we send to it but the notifications never show up.

This is happening a lot but (seemingly) randomly.


#2

An HTTP 200 response does not mean the notifications were sent. Because a request can (and should, when appropriate) contain multiple notifications, the HTTP status code can’t neatly represent the status of each notification. Instead, the status of each notification is in the response body, which has a receipt for each notification.

The response format is documented here: https://docs.expo.io/versions/latest/guides/push-notifications#http2-api.

The server API is also changing in the near future to provide the receipts asynchronously. The HTTP response for the request to send notifications will include a list of receipt IDs. Later, within 30 minutes, the receipts for the notifications will be available from another endpoint. The salient parts of the upcoming changes are explained here: https://blog.expo.io/upcoming-changes-to-the-expo-push-notification-service-summer-2018-254030da786b


#3

thanks for the detailed reply. I did know about that page in the docs and had previously read it. I must’ve messed up somewhere because i’m not checking the status within the response body.

I’ll modify to see if i start catching errors. thanks

also thanks for the heads up on upcomming changes blog post link


closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.