I get the following error when trying to send a message with an interactive card created in Chat App Card Builder.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>300
Request Body should be a valid JSON object.
I’m using this URL: https://api.zoom.us/v2/chat/users/“my user”/messages
The JSON of the message is this:
{
“message”:“Mensagem de avaliação do pedido número 123456”,
“to_contact":"XXXXX@XXXX.com”,
“interactive_cards”:[
{
“card_json”:
{
“content”:
{
“settings”:{},
“head”:
{
“text”:“Avaliação de atendimento”,
“style”:
{
“bold”: true
},
“sub_head”:
{
“text”:“Referente ao pedido nº 123456”
}
},
“body”:[
{
“type”:“section”,
“layout”:“horizontal”,
“sections”:[
{
“type”:“message”,
“text”:“De forma geral, qual foi sua percepção sobre esse atendimento?”
},
{
“type”:“radio_buttons”,
“action_id”:“radio_action”,
“options”:[
{
“text”:“Ruim”,
“value”:“value1”
},
{
“text”:“Normal”,
“value”:“value2”
},
{
“text”:“Boa”,
“value”:“value3”
},
{
“text”:“Excelente”,
“value”:“value4”
}
]
},
{
“type”:“message”,
“text”:“Com relação ao técnico, como foi a qualidade do seu atendimento?”
},
{
“type”:“radio_buttons”,
“action_id”:“radio_action”,
“options”:[
{
“text”:“Ruim”,
“value”:“value1”
},
{
“text”:“Normal”,
“value”:“value2”
},
{
“text”:“Boa”,
“value”:“value3”
},
{
“text”:“Excelente”,
“value”:“value4”
}
]
}
]
},
{
“type”:“actions”,
“items”:[
{
“text”:“Avaliar”,
“value”:“primary”,
“style”:“Primary”
}
]
}
]
}
}
}
]
}
If I remove the part: “interactive_cards”:[ {} ], the message is sent, but without the interactive card, a simple message is sent Despite removing the interactive card element, the content/settings-head-body child elements remain.