Expo Push API - How to Identify Failed Token from Error Message

I have Expo Push API working as explained in the docs (Notifications - Expo Documentation). When a batch contains a token where the device is no longer registered, i get a response similar to the one below. To remain a good citizen, I understand we need to stop sending to particular push tokens if they are no longer registered. How is it possible to use this information to identify the token that should no longer be sent? For instance, two messages were sent below in a batch but only one had an error - how can i identify the token that failed? (the id field, as i understand, is the receipt id and i can’t identify a relationship with the tokens used )

[
{
id: ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’,
status: ‘error’,
message: ‘The recipient device is not registered with FCM.’,
details: { error: ‘DeviceNotRegistered’, fault: ‘developer’ }
}
{ id: ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’’, status: ‘ok’ }
]

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