UserID and Fetch Notifications
Hi,
I wanted to know how can I get received notifications "payload"... cause I need these data when I'm opening my app from that notification.
You implement a fetchNewNotifications method, does it fit my need ?
Because I got a problem with it :
BatchPush.fetchNewNotifications('theUserId', 'authKey')
How can I get the theUserId ? Even if I use a custom one, as email for exemple, I need to wait that user is connected before get the "device" notifications... can't update the status of my app waiting for these credentials.
Hope you can help me ;)
Hello @matthieupinte, fetchNewNotifications will also return the payload if you sent one.
theUserId is the user provided in BatchPush.loginUser.
If you would like to fetch the notifications of the device rather than those of the user, it's not yet possible with this module. But the Batch SDK can do it, so if you're willing to send a PR, you're very welcome :)
Thanks @Minishlink when I have time, will try to ;)
Excuse me, i have a question, maybe silly one ;)
What is authKey in fetchNewNotifications method?
Hi @rahimasgari, please have a look at the Batch.com documentation here: https://batch.com/doc/ios/inbox.html#_custom-user-id-mode. Authentication Key is required if you use the Inbox feature at the user-level (using the Custom User ID) instead of the install-level.