Notifications
This guide will help you retrieve Account related notifications.
When an Account interacts with you or your content, the activity is recorded and notification detailing the interaction is stored in the Lens API.
Notification types
There are various types of notifications, each with a slightly different structure, requiring individual handling. The available notification types include:
CommentNotification - when someone comments on your post
FollowNotification - when someone follows you
MentionNotification - when someone mentions you in a post
RepostNotification - when someone reposts your post
QuoteNotification - when someone quotes your post
ReactionNotification - when someone adds reaction to your post
At any given time new notification types may be added to the Lens API. Make sure you handle gracefully unknown notification types to avoid breaking your app.
Notifications Query
- GraphQL
- React
- TypeScript
The Lens API offers a notifications query to retrieve notifications for an Account.
You MUST be authenticated as Account Owner or Account Manager to make this request.
The query supports pagination. For more information on pagination, refer to this guide.