GroupGroupInitGroupAttributes, GroupGroupDeleteGroupAttributes, and GroupGroupGetGroupAttributes.GroupInitGroupAttributes, setGroupAttributes, and GroupDeleteGroupAttributes APIs can be called by a logged-in user 10 times every 5 seconds in total in the SDK, after which the error code 8511 will be returned, or 5 times every second in total on the backend, after which the error code 10049 will be returned.GroupGetGroupAttributes API can be called by a logged-in user 20 times every 5 seconds in the SDK.GroupInitGroupAttributes API (Details) to initialize the group attributes, and the original group attributes, if any, will be cleared first.// Initialize the group attributesGroupAttributes attributes = new GroupAttributes{group_atrribute_key = "key",group_atrribute_value = "value"};TIMResult res = TencentIMSDK.GroupInitGroupAttributes(group_id, attributes, (int code, string desc, string user_data)=>{// Process the async logic});
GroupDeleteGroupAttributes API (Details) to delete a specified group attribute. If keys is null/nil, all the group attributes will be cleared.// Delete the group attributesGroupAttributes attributes = new List<string>{"attr1"};TIMResult res = TencentIMSDK.GroupDeleteGroupAttributes(group_id, attributes, (int code, string desc, string user_data)=>{// Process the async logic});
GroupGetGroupAttributes API (Details) to get a specified group attribute. If keys is null, all the group attributes will be obtained.// Get the group attributesGroupAttributes attributes = new List<string>{"attr1"};TIMResult res = TencentIMSDK.GroupGetGroupAttributes(group_id, attributes, (int code, string desc, List<GroupAttributes> attributes, string user_data)=>{// Process the async logic});
SetGroupAttributeChangedCallback to add a group event listener, all the group attributes will be called back through GroupAttributeChangedCallback (Details) when a group attribute is changed.TencentIMSDK.SetGroupAttributeChangedCallback((string group_id, List<GroupAttributes> group_attributes, string user_data)=>{// Process the callback logic});
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback