# Cannot update metadata

**URL:** <https://community.sendbird.com/t/cannot-update-metadata/544>\
**Category:** Sendbird Chat API/SDK\
**Tags:** chatsdk\
**Created:** [June 30, 2020, 2:34am UTC](https://community.sendbird.com/t/cannot-update-metadata/544 "2020-06-30T02:34:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Jung](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/daniel_jung/32/317_2.png) [@Daniel\_Jung](https://community.sendbird.com/u/Daniel_Jung)\
**Post date:** [June 30, 2020, 2:34am UTC](https://community.sendbird.com/t/cannot-update-metadata/544/1 "2020-06-30T02:34:39Z")

</div>

Since 3.0.108, I got error SendBirdException: Invalid parameter when try to update channel metadata via updateMetaData. Is there any update on this?

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [June 30, 2020, 3:12am UTC](https://community.sendbird.com/t/cannot-update-metadata/544/2 "2020-06-30T03:12:31Z")

</div>

@Daniel_Jung that version is quite awhile ago. What is your input for updateMetaData?

---

<div class="post-metadata">

**Author:** ![Daniel\_Jung](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/daniel_jung/32/317_2.png) [@Daniel\_Jung](https://community.sendbird.com/u/Daniel_Jung)\
**Post date:** [June 30, 2020, 3:33am UTC](https://community.sendbird.com/t/cannot-update-metadata/544/3 "2020-06-30T03:33:14Z")

</div>

Yes, it’s quite old version because I’m stuck with this issue. Here is the code snippet:

```auto
  setWriterOnline(channel: GroupChannel, isOnline: boolean): Promise<object> {
    return new Promise((resolve, reject) => {
      const metaDataMap = { is_writer_online: isOnline, is_writer_chatted: false };
      channel.updateMetaData(metaDataMap, (response, error) => (error ? reject(error) : resolve(response)));
    });
  },

```

As you see, I just passed an object, that’s all. And I got the following error:

SendBirdException  
800110

which means “Invalid Parameter - The parameter of the method specifies an invalid value”. I’ve also checked with latest version(3.0.127) and it is still happening.

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [June 30, 2020, 5:49pm UTC](https://community.sendbird.com/t/cannot-update-metadata/544/4 "2020-06-30T17:49:55Z")

</div>

Did metaData keys create before?

Have you tried this before?

> **[User Channel Metadata | JavaScript Chat SDK Documentation | Sendbird](https://docs.sendbird.com/javascript/user_channel_metadata#3_channel_metadata_4_update)**
>
> With metadata and metacounter which consist of key-value items, you can store additional information to users and channels. This page explains how to manage user metadata, channel metadata, and channel metacounter.

---

<div class="post-metadata">

**Author:** ![Harsha\_Nooka](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/harsha_nooka/32/354_2.png) [@Harsha\_Nooka](https://community.sendbird.com/u/Harsha_Nooka)\
**Post date:** [July 14, 2020, 6:31pm UTC](https://community.sendbird.com/t/cannot-update-metadata/544/5 "2020-07-14T18:31:38Z")

</div>

Is there an option to directly create the metadata **key value** pair on a message?

From the documentation, I see that we need to create the metadata key first and then add a value to it. [https://docs.sendbird.com/javascript/group\_channel\_advanced#3\_add\_extra\_data\_to\_a\_message](https://docs.sendbird.com/javascript/group_channel_advanced#3_add_extra_data_to_a_message)

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [July 14, 2020, 11:02pm UTC](https://community.sendbird.com/t/cannot-update-metadata/544/6 "2020-07-14T23:02:55Z")

</div>

@Harsha_Nooka you can use `metaArrays` in `UserMessageParam` to add meta data on sending a message [https://sendbird.github.io/core-sdk-javascript/module-model\_params\_userMessageParams-UserMessageParams.html](https://sendbird.github.io/core-sdk-javascript/module-model_params_userMessageParams-UserMessageParams.html)
