Profile

Profile

User profile object, used to describe the properties of a user, including the user nickname, profile photo address, personal signature, and gender. There are standard and custom user profiles.

Properties:
Name Type Description
userID String

User account

nick String

Nickname, whose length cannot exceed 500 bytes

gender String

Gender

  • TIM.TYPES.GENDER_UNKNOWN: unspecified
  • TIM.TYPES.GENDER_FEMALE: female
  • TIM.TYPES.GENDER_MALE: male
birthday Number

Birthday, whose value is of the uint32 type. Recommended usage: 20000101

location String

Location, whose length cannot exceed 16 bytes. We recommend that the app locally define a set of mappings between numbers and location names, and the backend actually stores 4 numbers of the uint32_t type:

  • 1st number: indicates the country.
  • 2nd number: indicates the province.
  • 3rd number: indicates the city.
  • 4th number: indicates the county.
selfSignature String

Personal signature, whose length cannot exceed 500 bytes

allowType String

Friend request verification mode

  • TIM.TYPES.ALLOW_TYPE_ALLOW_ANY: automatically accept all friend requests received
  • TIM.TYPES.ALLOW_TYPE_NEED_CONFIRM: manually accept friend requests received
  • TIM.TYPES.ALLOW_TYPE_DENY_ANY: automatically reject all friend requests received
language Number

Language, whose value is of the uint32 type

avatar String

Profile photo URL, whose length cannot exceed 500 bytes

messageSettings Number

Message setting, whose value is of the uint32 type. Flag bit: bit 0 (set to 0 to receive messages, and set to 1 to block messages)

adminForbidType String

Whether the admin prohibits the user from initiating a friend request

  • TIM.TYPES.FORBID_TYPE_NONE: allow the user to initiate a friend request (default value)
  • TIM.TYPES.FORBID_TYPE_SEND_OUT: prohibit the user from initiating a friend request
level Number

Level, whose value is of the uint32 type. We recommend that you divide the level to store the level information of multiple roles.

role Number

Role, whose value is of the uint32 type. We recommend that you divide the role to store the information of multiple roles.

lastUpdatedTime Number

Last update time, in the user's local time

profileCustomField Array.<Object>

Collection of custom profile key-value pairs, which can be used as needed. For more information, please see: https://cloud.tencent.com/document/product/269/1500#.E8.87.AA.E5.AE.9A.E4.B9.89.E8.B5.84.E6.96.99.E5.AD.97.E6.AE.B5.