Push token

The changeable address for one installed copy of your app, used by APNs or FCM to deliver a push notification to that device.

the address for sending a phone notificationhow does the server know which phone to pingnotification device idphone push addressAPNs tokennotifications stopped after the user reinstalledwhy did the notification go to the wrong phonepush tokken

See it

Live demo coming soon

What it is

A push token is the opaque address APNs or FCM gives one app install. Your app sends it to your backend, and the backend attaches it to a notification request so the push service knows which installed copy should receive the message. It is not a user ID and it is not the phone's permanent identity.

Register for one during notification setup and sync it to the backend with the signed-in account, platform, and app environment. A single person may have several valid tokens across a phone, tablet, work profile, or reinstall, so store a collection rather than one token column on the user.

Gotcha: tokens rotate. APNs can return a new device token when the app launches, and FCM calls its refresh callback when a registration token changes. Upsert the latest value, remove tokens when a provider reports them unregistered, and never use the token itself as proof that a request came from a particular user.

Ask AI for it

Implement push token registration for APNs and Firebase Cloud Messaging. On iOS, forward the token from application(_:didRegisterForRemoteNotificationsWithDeviceToken:); on Android, read FirebaseMessaging.getInstance().getToken() and handle FirebaseMessagingService.onNewToken(). Upsert each token to the backend with user ID, platform, app bundle or package ID, environment, locale, app version, and last-seen timestamp. Support several tokens per user, move a token safely when accounts change on one device, delete it on sign-out, and mark it inactive when APNs or FCM returns an unregistered response. Never treat a push token as authentication.

You might have meant

push notification rich pushruntime permissionpermission primingbundle id package name