Get message center data

Prev Next

The getMessageCenterData method allows you to retrieve messages from the Message Center API where each message is represented as a dictionary.

Parameter

Type

Description

Required

startDate

Date

Messages after this date (inclusive)

Yes

endDate

Date

Messages before this date (exclusive)

Yes

limit

Integer

Batch size (max # of messages)

Yes

getMessageCenterData(startDate: date, endDate: date, limit: int) : Promise<[any]>
const endDate = new Date();
const startDate = new Date();
startDate.setDate(endDate.getDate() - 30);
const messages = await window.insider.getMessageCenterData(startDate, endDate, 50);