Issue creating a conversation channel with avatarField in react-native [TS SDK]

I am getting the following error when trying to create a conversation channel:

Error creating the channel Error: Amity SDK (500000): Parameters validation error!.

I am following the instructions in the doc Create conversation channel by sending the following data:

avatarFileId: "amity user image",
displayName: "amity user name",
type: 'conversation' as Amity.ChannelType,
userIds: ["amity user id"],

I can create the channel without any problems if I do not send the avatarField.

The complete code is as follows:

  const createAmityChannel = async () => {
    const newChannel = {
      avatarFileId: userData.images.profile.thumbnail,
      displayName: userData.name,
      type: 'conversation' as Amity.ChannelType,
      userIds: [userData.id],
    };

    try {
      const res = await ChannelRepository.createChannel(newChannel);
      console.log(res);
    } catch (error: any) {
      console.error('Error creating the channel', error);
    }
  };

Versions:

  • node: 16.3.0
  • React-native: 0.70.6
  • Core JS: 3.30.2
  • Amity SDK: 6.11.0

Hello, how did you get the fileId for avatarFileId? Please ensure it is a valid FileId.

avatarFileId: 'fileId',

I was sending the wrong id, sorry my bad.