Identity and devices
OpenCDP mobile SDKs use three different identifiers. Confusing them is the most common cause of “push not received” during testing.
Person ID (identifier)
What it is: The user ID you pass to identify(). This is how OpenCDP knows who the person is.
Where to use it:
- Console Test push notification → Test by User ID
- Server
sendPush({ identifiers: { id: '...' } }) - In-app sync (query param
person_idin API calls)
Rules:
- Must not be an email address
- Must be consistent across
identify, push targeting, and campaigns
Example:
await OpenCDPSDK.instance.identify(
identifier: 'user_123',
properties: {
'email': '[email protected]',
'plan': 'pro',
},
);
How to find it during testing:
- Enter it on the example app config screen before initializing
- Read it from the example app status panel (Flutter / React Native)
- With
debug: true, look forperson_id=in SDK log URLs
Device ID (deviceId)
What it is: A stable ID for the physical device, generated by the SDK and sent in the registerDevice API body. It is not the same as the person ID or the FCM/APNs token.
How it is generated (mobile SDKs):
MD5("{device_model}-{manufacturer}-{identifier}")
Where identifier is the current person ID if identified, otherwise an anonymous device identifier stored locally.
Where it is used:
POST /v1/persons/registerDevicepayload fielddeviceId- Server-side
registerDevicewhen registering tokens manually
How to inspect it:
- Enable
debug: trueand trace theregisterDevicenetwork request body - It is not shown in example app UIs by default
You typically do not need the device ID to send a push from the console — use the person ID instead.
Push token (FCM / APNs)
What it is: The platform push registration token from Firebase (Android) or Apple (iOS). Required for the OS to deliver notifications to the device.
Where to use it:
- Pass to
registerDeviceToken(fcmToken: ...)orregisterDeviceToken(apnToken: ...) - Console Test push notification → Enter Device Token (direct device test, bypasses user lookup)
How to obtain it:
| Platform | Source |
|---|---|
| Android | FirebaseMessaging.getInstance().token or onNewToken in your FirebaseMessagingService |
| iOS | application(_:didRegisterForRemoteNotificationsWithDeviceToken:) in AppDelegate |
| Flutter | Firebase Messaging / turnkey setupPushNotifications |
| React Native | Firebase Messaging or Expo notifications — then call registerDeviceToken |
Quick reference
| ID | Purpose | Console test field | Example value |
|---|---|---|---|
| Person ID | Who receives the message | User ID | user_123 |
| Device ID | Device record in CDP | — (automatic) | a1b2c3... (MD5 hash) |
| FCM/APNs token | OS delivery | Device Token | Long platform string |
Register device flow
When you call registerDeviceToken, the SDK sends:
{
"identifier": "user_123",
"deviceId": "<sdk-generated-md5>",
"platform": "android",
"fcmToken": "<token>",
"apnToken": null,
"model": "Pixel 8",
"osVersion": "14",
"appVersion": "1.0.0"
}
Both person ID and push token must be registered before push delivery works reliably.