Skip to content

User Interaction Users

  • Endpoint Path: /api/v2/user/{uidOrUsername}/interaction/{type}
  • Method: GET
  • Request: Rest + Query

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidoptionalrequired
X-Fresns-Aid-Tokenoptionalrequired
X-Fresns-Uidoptionalrequired
X-Fresns-Uid-Tokenoptionalrequired

Rest Params

Parameter NameTypeRequiredDescription
uidOrUsernameNumber / StringrequiredUser uid or username
typeStringrequiredView type likers,dislikers,followers,blockers

Query Params

Parameter NameTypeRequiredDescription
orderDirectionStringoptionalSort by direction asc,desc, Default: desc
whitelistKeysStringoptionalWhitelist key names, only returns key-value pairs for the given key names
Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays
blacklistKeysStringoptionalBlacklist key names, removes specified key-value pairs from the returned data
Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays
pageSizeNumberoptionalNumber of items per page (default 15 items)
pageNumberoptionalPage number (default 1)

Request Description

  • type=likers Get the list of users who liked uidOrUsername.
  • type=dislikers Get the list of users who disliked uidOrUsername.
  • type=followers Get the list of users who followed uidOrUsername.
  • type=blockers Get the list of users who blocked uidOrUsername.
  • The interface will decide whether to output data based on the configuration table settings Operations > Interaction > View interaction log settings.
    • user_likers configuration, whether to output users who liked they
    • user_dislikers configuration, whether to output users who disliked they
    • user_followers configuration, whether to output users who followed they
    • user_blockers configuration, whether to output users who blocked they
  • If uidOrUsername is the logged-in user themselves, it means viewing their own data. When the above configuration is closed, this determines whether to output data.
    • my_likers configuration, whether to output users who liked me
    • my_dislikers configuration, whether to output users who disliked me
    • my_followers configuration, whether to output users who followed me
    • my_blockers configuration, whether to output users who blocked me
  • orderDirection The sort direction is sorted by creation time.

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": [
            {
                // Common Data Structure -> User Info
            }
        ]
    }
}

Released under the Apache-2.0 License