Send whatsapp quick reply message

Hello, I am trying to send a quick reply message through the WhatsApp channel, but get an error like this

{
    "code": 400,
    "status": "INVALID_VALUE",
    "message": "Required section by name - help_text is missing (or) empty in template"
}

I am also found a similiar question that has not been answered yet, can your team help us?
https://community.developers.freshworks.com/t/unable-to-send-message-with-quick-reply-buttons/6058

thank you

Hello @khaerulumam42
Welcome to the Freshworks community :tada:

Can you confirm, like with the post you linked to, you were also using Example #6 from the Freshchat API documentation here?

Sorry for the late reply, thank you for the answer, but I still got errors even using example #6 on the documentation that you give, this is my payload to URL : https://api.freshchat.com/v2/conversations

{
    "app_id": {{freshchat-kfazz-appid}},
    "channel_id": {{freshchat-kfazz-channelid-wa}},
    "messages": [
        {
            "app_id": {{freshchat-kfazz-appid}},
            "actor_type": "agent",
            "actor_id": {{freshchat-kfazz-adminid}},
            "channel_id": {{freshchat-kfazz-channelid-wa}},
            "message_type": "normal",
            "message_parts": [
                {
                    "text": {
                        "content": "Do you Agree?"
                    }
                }
            ],
            "reply_parts": [
                {
                    "collection": {
                        "sub_parts": [
                            {
                                "quick_reply_button": {
                                    "label": "Yes 👍"
                                }
                            },
                            {
                                "quick_reply_button": {
                                    "label": "No"
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "status": "new",
    "users": [
        {
            "id": "fe5a4825-40f7-4655-9486-1fb10acd32b7"
        }
    ]
}

and this is the error

Oops, An Unexpected Error Occurred!!

Can you help me to solve this?

Thank you Satwik!

Could you share an actual request and response? That will help understand where the problem is.

2 Likes

Hi @AnandVasagam , this is the curl

curl --location --request POST 'https://api.freshchat.com/v2/conversations' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer xxxx' \
--data-raw '{
    "app_id": xxx,
    "channel_id": xxx,
    "messages": [
        {
            "app_id": xxx,
            "actor_type": "agent",
            "actor_id": xxx,
            "channel_id": xxx,
            "message_type": "normal",
            "message_parts": [
                {
                    "text": {
                        "content": "Do you Agree?"
                    }
                }
            ],
            "reply_parts": [
                {
                    "collection": {
                        "sub_parts": [
                            {
                                "quick_reply_button": {
                                    "label": "Yes 👍"
                                }
                            },
                            {
                                "quick_reply_button": {
                                    "label": "No"
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "status": "new",
    "users": [
        {
            "id": xxx
        }
    ]
}'

and the response is plain text : Oops, An Unexpected Error Occurred!! with status code 500

thanks

Could you also share your freshchat account id or your freshchat url?

Sure, this is my freshchat url : https://kredifazz.freshchat.com/

Please try using below

"quick_reply_button" :{

"custom_reply_text" : "This is a bigger response for choose response 1" ,

"label" : "Response 1" ,

"payload" : "2222_333"

}

same result, attached on image file

Please try adding help_text under sub parts as below

 "sub_parts": [
                    {
                        "help_text": {
                            "content": "This is the help text"
                        }
                    },
                    {
                        "quick_reply_button": {
                            "display_order": "1",
                            "label": "Yes"
                        }
                    },
                    
                    {
                        "quick_reply_button": {
                            "display_order": "2",
                            "label": "No"
                        }
                    },

                    {
                        "quick_reply_button": {
                            "display_order": "3",
                            "label": "Nope"
                        }
                    }
                    
                ]
3 Likes