Hello,
Let’s dive into the details regarding the outcome status codes in Azure Notification Hubs.
Outcome Status Code 8:
You’re correct that a status code of 8 in the NotificationOutcome.Results[].Outcome indicates an invalid token.
Specifically, it means that the notification was received by the corresponding push notification service (e.g., APNS for iOS), but the service does not provide further information about what happens to the accepted notification.
Essentially, the token itself is valid, but there might be issues beyond the initial acceptance (e.g., the app might be uninstalled, the device might be inactive, etc.).
Other Status Codes:
While status code 8 is relevant for invalid tokens, there are other outcome status codes you should be aware of:
0: The notification was successfully delivered to the push notification service.
1: The notification was dropped due to an error (e.g., invalid payload, incorrect format).
2: The notification was throttled (rate-limited) by the push notification service.
3: The notification was expired (not delivered within the time window).
4: The notification was accepted by the push notification service, but its final delivery status is unknown (no further details).
5: The notification was dropped due to exceeding the maximum payload size.
6: The notification was dropped due to exceeding the maximum number of tags.
7: The notification was dropped due to exceeding the maximum number of registrations.
8: The notification was accepted by the push notification service, but its final delivery status is unknown (similar to status code 4).
Handling Invalid Tokens:
When dealing with invalid tokens, consider the following:
Regularly clean up invalid tokens from your registration database.
Implement token validation on your server to identify and remove invalid tokens.
Monitor the outcome status codes to proactively handle issues.
https://stackoverflow.com/questions/41941244/does-azure-notificationoutcomestate-completed-mean-the-notification-was-receivedhealthinsurancemarket
Hope this work for you.
Best regards,
Thomas Smith