# Example for "composeCard"

**URL:** <https://devforum.zoom.us/t/example-for-composecard/91362>\
**Category:** Zoom Apps\
**Created:** [July 5, 2023, 4:21pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362 "2023-07-05T16:21:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![latz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/latz/32/37889_2.png) [@latz](https://devforum.zoom.us/u/latz)\
**Post date:** [July 5, 2023, 4:21pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/1 "2023-07-05T16:21:10Z")

</div>

My App is supposed to allow the user to send pre-defined text blocks (quiz questions) to the chat. So I suppose I have to use the “zoomSdk.composeCard” method. When I use the example from the docs

```auto
await zoomSdk.composeCard({
        "type": "interactiveCard",
        "message": "some message",
        "previewCard": {
          "title": "some title",
          "description": "some description",
        },

```

I get the message:

```auto
Error: Validation error, please check API parameters.

```

I’m not really sure what the actual parameters should be. Can anyone provide a concrete example on how to use this function?

Thank you.

---

<div class="post-metadata">

**Author:** ![henry2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/henry2/32/20443_2.png) [@henry2](https://devforum.zoom.us/u/henry2)\
**Post date:** [July 5, 2023, 4:45pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/2 "2023-07-05T16:45:38Z")

</div>

> [@latz](#):
>
> `composeCard`

Does this page from the docs help? It looks like you need a signature.

> **[ComposeCardOptions | @zoom/appssdk - v0.16.15](https://appssdk.zoom.us/types/ZoomSdkTypes.ComposeCardOptions.html)**
>
> Documentation for @zoom/appssdk - v0.16.15

---

<div class="post-metadata">

**Author:** ![latz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/latz/32/37889_2.png) [@latz](https://devforum.zoom.us/u/latz)\
**Post date:** [July 5, 2023, 6:45pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/3 "2023-07-05T18:45:11Z")

</div>

I thought that too.  
Meanwhile I found out what an HMAC is but I still don’t know what the “signing secret” is and whee to get it.

---

<div class="post-metadata">

**Author:** ![henry2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/henry2/32/20443_2.png) [@henry2](https://devforum.zoom.us/u/henry2)\
**Post date:** [July 6, 2023, 12:07pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/4 "2023-07-06T12:07:34Z")

</div>

I would assume that it is similar to the encryption used by the App Context - which uses the apps secret key. But I would not recommend putting the secret key in the client side code in a prod environment. If it is that then I would suggest that you do the encryption in the app server and provide a endpoint the client can use.

Hopefully someone from zoom can clarify.

---

<div class="post-metadata">

**Author:** ![latz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/latz/32/37889_2.png) [@latz](https://devforum.zoom.us/u/latz)\
**Post date:** [July 7, 2023, 9:35am UTC](https://devforum.zoom.us/t/example-for-composecard/91362/5 "2023-07-07T09:35:11Z")

</div>

I think I have to give up on this for the time coming. The documentation on this topic is too incomplete. The error message doesn’t give any precise hint which part of the options is wrong, and I’m stabbing around in the dark.

- What format should the timestamp be in? Epoch, ISO, …?
- How to calculate the signature? “HMAC of the message” is not very precise. Why do I need to calculate the signature myself, can’t it be done by the SDK?

As Henry said, can somebody of the Zoom team clarify the situation?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [July 13, 2023, 7:15pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/6 "2023-07-13T19:15:28Z")

</div>

@ojus.zoom Is this something you can chime in on? I think you’re the SME on this 😄

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [July 14, 2023, 5:29pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/7 "2023-07-14T17:29:41Z")

</div>

Hi @latz

apologies on this. We are working on adding the documentation for this. In the meantime, here is how to use the method:

const card = {  
“type”: “interactiveCard”,  
“previewCard”:  
{  
“title”: “title”,  
“description”: “description”  
},  
“message”: message,  
“signature”: signature,  
“timestamp”: timestamp  
};

---

<div class="post-metadata">

**Author:** ![jotcast](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@jotcast](https://devforum.zoom.us/u/jotcast)\
**Post date:** [July 24, 2023, 4:03pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/8 "2023-07-24T16:03:36Z")

</div>

Hi @ojus.zoom, thank you for providing the API format, however it is still not sufficient to utilize this API method. We have made countless attempts and always receive the “Error: Validation error, please check API parameters.” error, which is too vague to be helpful.

How is the signature generated? The documentation states that it is the HMAC of the message, yet the description for the timestamp field says it is

> timestamp used to generate signature

We have tried many combinations of using the secret, message, and timestamp to create the signature, to no avail. This really needs to be clarified. Could you please provide some sort of example to use as a baseline?

Additionally, what is the expected format for the timestamp?

We need these additional details in order to use the API. Thank you.

---

<div class="post-metadata">

**Author:** ![latz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/latz/32/37889_2.png) [@latz](https://devforum.zoom.us/u/latz)\
**Post date:** [July 26, 2023, 3:42pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/9 "2023-07-26T15:42:31Z")

</div>

I would like to expand my initial question.

Looking through the “In-Client Features” I found an API method called

`"composeText - Set the composed text in the compose box"`

That sounds even more like the function that I’m looking for. Unfortunately, I couldn’t find **any** documentation. It’s not even available in the newest SDK implementation (v0.16.13).

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [July 26, 2023, 11:03pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/10 "2023-07-26T23:03:26Z")

</div>

The documentation should be available soon. Here is a sample app in the meantime that demonstrates how to use the compose card function:

> **[GitHub - zoom/Zoom-Recordings-Team-Chat-App: This repository contains a...](https://github.com/zoom/Zoom-Recordings-Team-Chat-App)**
>
> This repository contains a Node.js application that allows you to create a Zoom Team Chat App for managing recordings. Follow the instructions below to set up and run the application. - GitHub - zo...

---

<div class="post-metadata">

**Author:** ![latz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/latz/32/37889_2.png) [@latz](https://devforum.zoom.us/u/latz)\
**Post date:** [June 6, 2025, 7:06pm UTC](https://devforum.zoom.us/t/example-for-composecard/91362/11 "2025-06-06T19:06:50Z")

</div>

Replying to myself:

Since Desktop Client Version 6.2.5 there’s a function called “sendMessageToChat” ([ZoomSdk | @zoom/appssdk - v0.16.29](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#sendMessageToChat)) that makes sending the message to the chat very easy.
