Profile Management

Profile System Overview

Instant Messaging (IM) provides a complete set of profile solutions through its user profile hosting capacity. IM's profile hosting service enables your users to easily set and pull profiles.
IM can store profile information, ensuring that your data has remote disaster recovery, cross-region deployment, and auto scaling capabilities. In this way, you are completely free from complex processing flows, such as server downtime, multi-copy primary-secondary replication, and capacity scaling.
IM provides the business processing flows commonly used in the industry, with which you do not have to worry about user profile business logic.
IM provides professional operation processes and teams, ensuring 99.99% service quality annually and helping you offer services known for their stability.
IM provides easy-to-use service APIs and easy-to-access guidelines, with premium services throughout the whole process.
By using IM's profile hosting service, you will be able to:
Store, read, and write standard profile fields.
Store, read, and write custom profile fields.

Profile Fields

A profile is a set of data that describes user properties. IM's profile system supports standard and custom profile fields. Profile fields have the following characteristics:
Profile fields are expressed in key-value format.
Key is in string format, and its name can only contain uppercase and lowercase letters, numbers, and underscores.
Value has the following types: a. An integer of uint32_t type (not supported for custom fields) b. An integer of uint64_t type (not supported for custom fields) c. A string of string type (the length of the string cannot exceed 500 bytes.)

Standard Profile Fields

Currently, IM supports the following standard profile fields:
Field Name
Type
Description
Push Notification upon Update
Notes
Tag_Profile_IM_Nick
string
Nickname
Yes
The maximum length is 500 bytes.
Tag_Profile_IM_Gender
string
Gender
Yes
Gender_Type_Unknown: the gender is not set
Gender_Type_Female: female
Gender_Type_Male: male
Tag_Profile_IM_BirthDay
uint32
Date of birth
Yes
Recommended format: 20190419
Tag_Profile_IM_Location
string
Location
Yes
The maximum length is 16 bytes. Recommended usage:
The app locally defines a set of number-location mappings.
The backend stores four uint32_t numbers.
The first uint32_t denotes the country or region.
The second uint32_t denotes the state or province.
The third uint32_t denotes the city.
The fourth uint32_t denotes the district or county.
Tag_Profile_IM_SelfSignature
string
Personal signature
Yes
The maximum length is 500 bytes.
Tag_Profile_IM_AllowType
string
Approval method for new friend requests
Yes
AllowType_Type_NeedConfirm: manually accept new friend requests. AllowType_Type_AllowAny: automatically accept all new friend requests. AllowType_Type_DenyAny: reject all new friend requests.
Tag_Profile_IM_Language
uint32
Language
Yes
The application locally defines the number-language mapping and needs to locally convert the number corresponding to the language into text.
Tag_Profile_IM_Image
string
URL of the profile photo
Yes
The maximum length is 500 bytes.
Tag_Profile_IM_AdminForbidType
string
Admin forbids tagging new friend requests
Yes
AdminForbid_Type_None: the default value, and sending new friend requests is allowed. AdminForbid_Type_SendOut: sending new friend requests is forbidden.
Tag_Profile_IM_Level
uint32
Level
Yes
Generally, a piece of UINT-8 data stores the information of one level.You can divide the level to store the level information of multiple roles.
Tag_Profile_IM_Role
uint32
Role
Yes
Generally, a piece of UINT-8 data stores the information of one role.You can divide the role to store the information of multiple roles.

Custom Profile Fields

Custom profile fields are the user data set by each app according to its own business needs. By using custom profile fields, an app can add additional data to user profiles and perform read and write operations through existing APIs.

Applying for custom profile fields

To apply for custom profile fields, log in to the Chat console and select Application Configuration > Feature Configuration. After your application is submitted, the custom profile fields will take effect in five minutes. When applying for custom profile fields, you need to submit the following information for each field:
The name of the custom profile field (Key). For more information, see Naming Rules for Custom Profile Fields.
The type of the custom profile field (Value). For more information, see Profile Fields.

Naming rules for custom profile fields

The rules for naming custom profile fields are as follows:
The name of the custom profile field contains the prefix and keyword parts.
The prefix of the custom profile field is Tag_Profile_Custom.
Keyword: the keyword must be a string of letters with a length no more than 8 bytes. We recommend you use an English word or its abbreviation as the keyword.
Example: if the custom field to be applied for by an app has the keyword Test, then the name of the custom profile field is: Tag_Profile_Custom_Test.