Skip to content

User Edit

  • Endpoint Path: /api/v2/user/edit
  • Method: PUT
  • Request: application/json

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidrequiredrequired
X-Fresns-Uid-Tokenrequiredrequired

Body Params

Parameter NameTypeRequiredDescription
usernameStringoptionalUsername (leave empty to not modify)
nicknameStringoptionalUser nickname (leave empty to not modify)
avatarFidStringoptionalAvatar image file FID (leave empty to not modify)
avatarUrlStringoptionalAvatar image URL (leave empty to not modify)
bannerFidStringoptionalBackground banner image file FID (leave empty to not modify)
bannerUrlStringoptionalBackground banner image URL (leave empty to not modify)
genderNumberoptionalGender (leave empty to not modify)
birthdayStringoptionalBirthday (leave empty to not modify, format: Y-m-d H:i:s)
bioStringoptionalBio (leave empty to not modify)
locationStringoptionalLocation (leave empty to not modify)
conversationLimitNumberoptionalConversation settings (leave empty to not modify)
commentLimitNumberoptionalComment settings (leave empty to not modify)
archivesArrayoptionalExtended information (leave empty to not modify)
deviceTokenStringoptionaliOS or Android device Token (leave empty to not modify)

Request Description

  • Leaving both avatarFid and avatarUrl empty means not changing them, choose one when passing parameters.
  • Leaving both bannerFid and bannerUrl empty means not changing them, choose one when passing parameters.
  • If using fid for avatar and background banner images, first use the file upload interface, then pass the obtained fid as a parameter.
  • Example of upload parameters:
    • usageType = 5
    • tableName = users
    • tableColumn = avatar_file_id or banner_file_id
    • tableKey = current user's uid or username
  • Example of extended information:
json
[
    {
        "code": "code",
        "value": "value",
        "isPrivate": false, // Private or not (public display or not)
        "fskey": null
    },
    {
        "code": "code",
        "value": "value",
        "isPrivate": true,
        "fskey": "Fresns"
    }
]

Return

json
{
    "code": 0,
    "message": "ok",
    "data": null
}

Released under the Apache-2.0 License