getNotifications() doesn't return anything

·
Tempe Techie
·kjzl6cwe1jw1-1h4gdtlh13hy

I'm trying to get notifications through the getNotifications() call, but it's not returning anything (both data and error are "undefined").

I'm following instructions in the docs: https://useorbis.com/documentation/sdk/api-documentation/getNotifications

Are they up-to-date?

EDIT/SOLUTION:

If you want to get notifications for your context, use this query:

let res = await orbis.getNotifications({type: "social", context: "enter-your-context-id"});  

Additional methods that will come useful:

let res = await orbis.getNotificationsCount({type: "social", context: "enter-your-context-id"});  
  
let res = await orbis.setNotificationsReadTime({type: "social", context: "enter-your-context-id", timestamp: 123456789});  

Timestamp is the current timestamp, when user read the notifications.

Be the first to leave a comment here.