View Notification history
📜 GetNotificationHistory and onGetNotificationsHistory
🔍 Overview
The getNotificationHistory
API fetches historical notifications acted upon by the user. It supports filters like date range, keyword, status, and action performed.
The response is received asynchronously via the onGetNotificationsHistory
event.
🔗 Method Signature
Parameters
Parameter | Type | Description |
---|---|---|
recordCount | Number | Number of records to fetch (0 = all) |
enterpriseID | String | Optional, can be empty if not used |
startIndex | Number | Should be ≥ 1 |
startDate | String | Format: yyyy-MM-dd'T'HH:mm:ssz , optional |
endDate | String | Format: yyyy-MM-dd'T'HH:mm:ssz , optional |
notificationStatus | String | Filter by status (e.g., EXPIRED , UPDATED ) |
actionPerformed | String | Filter by action taken (Accept , Reject , etc.) |
keywordSearch | String | Search string across notifications |
deviceID | String | Filter by specific device ID |
🎯 Event: onGetNotificationsHistory
This event is triggered after calling getNotificationHistory
. Notifications are provided in:response.pArgs.response.ResponseData.history
.
📋 Fields in onGetNotificationsHistory
Payload
onGetNotificationsHistory
PayloadField | Type | Description |
---|---|---|
notification_uuid | String | Unique identifier for the notification |
status | String | Final status of the notification: EXPIRED , UPDATED , TAMPERED , etc. |
signing_status | String | Signature validation status: Verified , Failed , NA |
action_performed | String | Action taken by user, e.g., Accept , Reject , Fraud |
update_ts | String | Timestamp of user action or system update (ISO format) |
create_ts | String | Time the notification was generated (ISO format) |
expiry_timestamp | String | Expiry time of the notification (ISO format) |
body | Array | Localized content (subject/message pairs), each with: |
→ lng | String | Language code of the message content (e.g., "English") |
→ subject | String | Notification title shown to the user |
→ message | String | Notification body message |
actions | Array | List of possible actions (rare in history; mostly used in active notif) |
→ label | String | Text to show on the button (e.g., "Accept") |
→ action | String | Action value (e.g., accept , reject ) |
→ authlevel | String | Authentication level needed (usually "0" for most) |
ds_required | Boolean | Whether digital signature was required |
🔖 Notification Status Values
Status | Meaning |
---|---|
EXPIRED | Notification was not acted upon within the configured expiry window |
UPDATED | Notification has been updated after user interaction |
TAMPERED | Notification data was found altered during validation |
DISMISSED | Notification was dismissed or cleared by the user or system |
NEW | Fresh notification at time of generation (used internally, not in history) |
🛡️ Digital Signing Status (signing_status
)
signing_status
)Status | Meaning |
---|---|
Verified | Signature associated with the notification was validated successfully |
Failed | Signature validation failed (possible tampering or integrity loss) |
NA | Not applicable (e.g., non-signing notifications or legacy messages) |
💡 Sample Response Snippet
{
"errCode": 0,
"eMethId": 16,
"pArgs": {
"response": {
"ResponseData": {
"total_count": 10,
"history": [
{
"notification_uuid": "2ceeefa0-6e50...",
"status": "EXPIRED",
"signing_status": "NA",
"action_performed": "Accept",
"create_ts": "2024-10-23T06:19:51UTC",
"expiry_timestamp": "2024-10-23T06:22:50UTC",
"update_ts": "2024-10-23T06:21:00UTC",
"ds_required": false,
"actions": [
{
"label": "Accept",
"action": "accept",
"authlevel": "1"
},
{
"label": "Reject",
"action": "reject",
"authlevel": "0"
}
],
"body": [
{
"lng": "English",
"subject": "Additional Device Activation Request",
"message": "You are attempting to activate a new device. Please Accept or Reject."
}
]
}
]
}
}
}
}
📲 Code Snippets (in collapsible menu)
📱 React Native
RdnaClient.getNotificationHistory(
0, "", 1, "", "", "", "", "", "",
(syncResponse) => {
console.log("GetNotificationHistory sync response", syncResponse);
}
);
RdnaClient.on("onGetNotificationsHistory", (event) => {
console.log("onGetNotificationsHistory", event);
});
📱 Flutter
rdnaClient.getNotificationHistory("0", "", "1", "", "", "", "", "", "");
rdnaClient.on(RdnaClient.onGetNotificationsHistory, (data) {
print("onGetNotificationsHistory: $data");
});
📱 Cordova
com.uniken.rdnaplugin.RdnaClient.getNotificationHistory(
function(success) {
console.log("History success", success);
},
function(error) {
console.error("History error", error);
},
[0, "", 1, "", "", "", "", "", ""]
);
📱 Native Android
RDNAError err = rdna.getNotificationHistory(
0, "", 1, "", "", "", "", "", ""
);
@Override
public void onGetNotificationsHistory(RDNAStatusGetNotificationHistory status) {
Log.d("SDK", "onGetNotificationsHistory: " + status.toString());
}
📱 Native iOS
RDNAError* err = [rdna getNotificationHistory:0
withEnterpriseID:@""
withStartIndex:1
withStartDate:@""
withEndDate:@""
withNotificationStatus:@""
withActionPerformed:@""
withKeywordSearch:@""
withDeviceID:@""];
- (void)onGetNotificationsHistory:(RDNAStatusGetNotificationHistory *)status {
NSLog(@"onGetNotificationsHistory: %@", status);
}
Updated 2 months ago