Push notifications after switching account.

SDK Version: 36
Platforms(Android/iOS/web/all): ioS

So, we have an app that we’ve developed. It uses push notifications and we call Notifications.getExpoPushTokenAsync() and pass it to the server whenever the user logs in or does certain actions.

But, originally, the app was developed on an expo account shared with other projects. We split it off and changed it to our new account just for this app (this account, citrisoft). We logged out out of the other account with the expo cli and logged into the citrisoft account.

We made a new build and deployed it to the app store and have been publishing our latest updates. (also android, which has worked fine)

Push notifications for people installing the new build work fine, but for users who installed before we switched expo accounts, they no longer receive push notifications. And calling Notifications.getExpoPushTokenAsync() returns the same token, which doesn’t work for sending pushes.

When fetching the receipt for a push, we get this error:
{“data”:{“bf3112c6-e8c2-4d76-abad-bb97af751907”:{“status”:“error”,“message”:“The Apple Push Notification service failed to send the notification (reason: InvalidProviderToken, status code: 403). Read Apple’s docs about "Communicating with APNs" to learn what this error means.”,“details”:{“apns”:{“reason”:“InvalidProviderToken”,“statusCode”:403},“error”:“InvalidCredentials”,“sentAt”:1584640836},“__debug”:{}}}}

Are the old tokens now associated with the former account and using the wrong Push Notification Key? Is there any way to force the application to get a new ExpoPushToken? Should we use “expo credentials:manager -p ios” and Add a new push notifications key?

So far the only way we’ve found to get old installations to work is by deleting the app and reinstalling which isn’t a great user experience.

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