import { Novu } from "@novu/api";
const novu = new Novu({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.subscribers.notifications.unseenCount({
seen: false,
subscriberId: "<value>",
limit: 2166.35,
});
// Handle the result
console.log(result)
}
run();{
"count": 123
}Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier subscriberId.
import { Novu } from "@novu/api";
const novu = new Novu({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.subscribers.notifications.unseenCount({
seen: false,
subscriberId: "<value>",
limit: 2166.35,
});
// Handle the result
console.log(result)
}
run();{
"count": 123
}Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eWas this page helpful?