[Notification] List
- Endpoint Path:
/api/fresns/v1/notification/list - Method:
GET - Request:
Query
Headers Optional Parameter
| Key | Public Mode (Required) | Private Mode (Required) |
|---|---|---|
| X-Fresns-Aid | required | required |
| X-Fresns-Aid-Token | required | required |
| X-Fresns-Uid | required | required |
| X-Fresns-Uid-Token | required | required |
Query Params
| Key | Type | Required | Description |
|---|---|---|---|
| types | String | optional | 1 System 2 Recommend 3 Like 4 Dislike 5 Follow 6 Block 7 Mention 8 Comment 9 Quote |
| status | Boolean | optional | 0 Unread1 ReadNull to output all |
| filterUserType | String | optional | whitelist only returns key-value pairs for the given key namesblacklist removes specified key-value pairs from the returned dataApplies only to the actionUser parameter in the returned result |
| filterUserKeys | String | optional | Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays |
| filterInfoType | String | optional | whitelist only returns key-value pairs for the given key namesblacklist removes specified key-value pairs from the returned dataApplies only to the actionInfo parameter in the returned result |
| filterInfoKeys | String | optional | Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays |
| pageSize | Number | optional | Number of items per page (default 15 items) |
| page | Number | optional | Page number (default 1) |
Request Description
- Leave
typesempty to output all, or pass multiple parameters separated by English commas. - Sorted in descending order by time, with the latest ones at the top.
- System message interpretation:
types=1means the system sent you acontentmessage.isAccessApp: Whether to visit the plugin page.actionUser: Whether there is a triggering user.actionTarget + actionInfo: Whether there is additional content.
- Recommended message interpretation:
types=2means the system recommended content for you.content: Recommendation text.isAccessApp: Whether to visit the plugin page.actionUser: Whether there is a triggering user.actionTarget + actionInfo: Recommended content.
- Interaction message interpretation:
types=3meansactionUserliked youractionTarget + actionInfo.types=4meansactionUserdisliked youractionTarget + actionInfo.types=5meansactionUserfollowed youractionTarget + actionInfo.types=6meansactionUserblocked youractionTarget + actionInfo.types=7meansactionUsermentioned you inactionTarget + actionInfo.content: Summary of the mentioned content.
types=8meansactionUsercommented on youractionTarget + actionInfo.content: Summary of the comment content.contentFsid: Their comment cid.
types=9meansactionUserquoted on youractionTarget=4 + actionInfo.content: Summary of the post content.contentFsid: Their post pid.
- Trigger action
actionTypetype introduction:- Like
- Dislike
- Follow
- Block
- Publish
- Edit
- Delete
- Sticky
- Digest
- Manage
Return
json
{
"code": 0,
"message": "ok",
"data": {
"pagination": {
"total": "Number / How much data in total",
"pageSize": "Number / How much data on each page",
"currentPage": "Number / Current page number",
"lastPage": "Number / Last page number"
},
"list": [
{
"nmid": "String / Notification Message ID",
"type": "Number / Notification type",
"content": "String / Notification content",
"isMarkdown": "Boolean / Whether the content is in Markdown format",
"isMention": "Boolean / Is mention to a notice (I was mentioned in someone else's content and then notified of the interactive action)",
"isAccessApp": "Boolean / Whether to visit the app page",
"appUrl": "String / App page URL",
"actionUser": {
// User information of the user who triggered the message
// Common Data Structure -> User Info
},
"actionUserIsAnonymous": "Boolean / Whether anonymous",
"actionType": "Number / Trigger action type",
"actionTarget": "Number / Trigger target",
"actionInfo": {
// Trigger-related content (Common Data Structure)
// actionTarget=1 User information
// actionTarget=2 Group information
// actionTarget=3 Hashtag information
// actionTarget=4 Geotag information
// actionTarget=5 Post information
// actionTarget=6 Comment information
},
"contentFsid": "String / Content event pid or cid",
"datetime": "String / Notification time",
"datetimeFormat": "String / Formatted notification time",
"timeAgo": "String / Humanized notification time",
"readStatus": "Boolean / Read status"
}
]
}
}