tencent cloud

All product documents
Chat
Setting Nickname and Avatar (Full Platform)
Last updated: 2024-05-09 14:25:09
Setting Nickname and Avatar (Full Platform)
Last updated: 2024-05-09 14:25:09
This document describes how to set the user's avatar and nickname.

Setting Avatar and Nickname

To customize the nickname or avatar, use the following API for update:
Android (Kotlin)
Android (Java)
iOS (Objective-C)
iOS (Swift)
Flutter (Dart)
uni-app (Andorid&iOS)
Web&H5
TUICallKit.createInstance(context).setSelfInfo("jack", "https:/****/user_avatar.png", callback)
TUICallKit.createInstance(context).setSelfInfo("jack", "https:/****/user_avatar.png", callback);
[[TUICallKit createInstance] setSelfInfo:@"" avatar:@"" succ:^{

} fail:^(int code, NSString *errMsg) {

}];
TUICallKit.createInstance().setSelfInfo(nickname: "", avatar: "") {

} fail: { code, message in

}
TUIResult result = TUICallKit.instance.setSelfInfo('userName', 'url:********');
const options = {
nickName: 'jack',
avatar: 'https:/****/user_avatar.png'
}
TUICallKit.setSelfInfo(options, (res) => {
if (res.code === 0) {
console.log('setSelfInfo success');
} else {
console.log(`setSelfInfo failed, error message = ${res.msg}`);
}
});
try {
await TUICallKitServer.setSelfInfo({ nickName: "jack", avatar: "http://xxx" });
} catch (error: any) {
alert(`[TUICallKit] Failed to call the setSelfInfo API. Reason: ${error}`);
}
Note
The update of the callee's nickname and avatar may be delayed during a call between non-friend users due to the user privacy settings. After a call is made successfully, the information will also be updated properly in subsequent calls.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon