How to pass an ID to the Expo Notifications Server in the notification push request that would be returned in the response?

22 views Asked by At

I'm integrating expo notifications into an existing system with an established architecture for accessing web services. When processing the response all I have is the request and the response jsons. I need to reference the received ticket IDs to the original data.

Originally I had the idea to include that ID as an additional message with a faked token. That message will fail but I'll be able to update my original data with the ticket ID. But this solution sounds "hacky". I'd prefer to send the ID in a custom http header supposing Expo will return it unchanged. But I don't see in the Expo documentation it is supported.

What do you suggest?

1

There are 1 answers

0
Sammybar On

Oops, I missed the optional "data" field available for each pushed message in both Android and IOS... Looks like the ideal candidate. It is documented here, even there is an example in the reference here.