[Notification] List
- Endpoint Path:
/api/v2/notification/list - Method:
GET - Request:
Query
Headers Optional Parameter
| Parameter Name | 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
| Parameter Name | 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 Readleave empty to output all |
| userWhitelistKeys | String | optional | Whitelist key names, only returns key-value pairs for the given key names Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays Valid only for the actionUser parameter |
| userBlacklistKeys | String | optional | Blacklist key names, removes specified key-value pairs from the returned data Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays Valid only for the actionUser parameter |
| whitelistKeys | String | optional | Whitelist key names, only returns key-value pairs for the given key names Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays Valid only for the actionInfo parameter |
| blacklistKeys | String | optional | Blacklist key names, removes specified key-value pairs from the returned data Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays Valid only for the actionInfo parameter |
| 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.isAccessPlugin: Whether to visit the plugin page.actionUser: Whether there is a triggering user.actionObject + actionInfo: Whether there is additional content.
- Recommended message interpretation:
types=2means the system recommended content for you.content: Recommendation text.isAccessPlugin: Whether to visit the plugin page.actionUser: Whether there is a triggering user.actionObject + actionInfo: Recommended content.
- Interaction message interpretation:
types=3meansactionUserliked youractionObject + actionInfo.types=4meansactionUserdisliked youractionObject + actionInfo.types=5meansactionUserfollowed youractionObject + actionInfo.types=6meansactionUserblocked youractionObject + actionInfo.types=7meansactionUsermentioned you inactionObject + actionInfo.content: Summary of the mentioned content.
types=8meansactionUsercommented on youractionObject + actionInfo.content: Summary of the comment content.contentFsid: Their comment cid.
types=9meansactionUserquoted on youractionObject=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": [
{
"id": "Number / Notification 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)",
"isAccessPlugin": "Boolean / Whether to visit the plugin page",
"pluginUrl": "String / Plugin 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",
"actionObject": "Number / Trigger target",
"actionInfo": {
// Trigger-related content (Common Data Structure)
// actionObject=1 User information
// actionObject=2 Group information
// actionObject=3 Hashtag information
// actionObject=4 Post information
// actionObject=5 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"
}
]
}
}