Question Details

Unanswered
Cannot send flex with 'Hero' block

let's say i've Json like this

{
      "type": "carousel",
      "contents": [
        {
          "type": "bubble",
          "hero": {
            "type": "box",
            "layout": "horizontal",
            "contents": [
              {
                "type": "image",
                "url": "https://www.SOME_VALID_URL_IMAGE.jpg",
                "align": "start",
                "size": "md",
                "offsetStart": "10px",
                "offsetTop": "-13px"
              },
              {
                "type": "text",
                "text": 'Helo',
                "size": "xl",
                "weight": "bold",
                "offsetTop": "20px"
              }
            ],
            "height": "80px",
            "backgroundColor": "#D3D3D3"
          },
			  #BLOCK BODY HERE

first time write my template using Flex Simulator and i get json perfectly what i want to use, i put this json from Flex Simulator into my bot script but there is returning error

LineBotApiError: status_code=400, error_response={"details": [{"message": "must be specified", "property": "/contents/0/hero/url"}, {"message": "must be specified", "property": "/contents/1/hero/url"}], "message": "A message (messages[0])\u00a0in the request body is invalid"}

if i change 'Hero' block to 'Header' block thats work, but result is not same can anyone explain me about this? Thanks before for any help

0
Profile picture
Al!

Answers

0
Are you sure? question.vm