--- title: "Get message center data" slug: "expo-get-message-center-data" description: "Retrieve push notification history with getMessageCenterData, filter by date range, limit, and custom user identifiers." updated: 2026-10-10T20:12:06Z published: 2026-10-10T20:12:06Z canonical: "academy.insiderone.com/expo-get-message-center-data" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Get message center data The getMessageCenterData method allows you to retrieve the pushes that you sent to your users in the past three months in a defined range and quantity. | Parameter | Data Type | | --- | --- | | limit | Integer | | startDate | Date | | endDate | Date | Make sure that you pass the values for *startDate* and *endDate* in **timestamps**. ## getMessageCenterData for logged in users ### Method signature ```javascript static getMessageCenterData(limit: number, startDate: Date, endDate: Date, callback: Function) ``` ### Method example ```javascript RNInsider.getMessageCenterData(10, startDate, endDate, function (data) { }) ``` The getMessageCenterData method functions with a user-based mechanism. For example, if user A and user B log into the app on the same device, each user will see the push notifications they received. ## Retrieve data with custom identifiers You can also retrieve Message Center data for related users (e.g., child accounts under a parent account) by passing an RNInsiderIdentifier object. When identifiers are provided, the SDK sends the specified identifiers instead of the current user's Insider ID. | Parameter | Type | Description | | --- | --- | --- | | limit | Number | Maximum number of notifications to return | | startDate | Date | Start date for the notification query range | | endDate | Date | End date for the notification query range | | identifiers | RNInsiderIdentifier | User identifiers to query notifications for a specific user | | callback | Function | Callback that receives the resulting message center data array | ### Method signature ```javascript static getMessageCenterDataWithIdentifiers( limit: number, startDate: Date, endDate: Date, identifiers: RNInsiderIdentifier, callback: (messageCenterData: any) => void ): void ``` ### Method example ```javascript const identifiers = new RNInsiderIdentifier() .addEmail('child@insiderone.com') .addPhoneNumber('+905551234567') .addUserID('unique-user-id') .addCustomIdentifier('account_id', 'parent-account-123') const end = new Date() const start = new Date(end.getTime() - 30 * 24 * 60 * 60 * 1000) // 30 days ago RNInsider.getMessageCenterDataWithIdentifiers(50, start, end, identifiers, (messageCenterData) => { // Handle the message center data for the specified user console.log(`Fetched ${messageCenterData.length} messages`) }) ``` If the provided RNInsiderIdentifier contains no identifiers, the SDK automatically falls back to the current user's Insider ID. Passing **null** or **undefined** for any parameter causes the call to be skipped with a parameter validation warning.