Home > Mobile >  Sending WhatsApp interactive message of list type fails when sent with image header
Sending WhatsApp interactive message of list type fails when sent with image header

Time:06-07

I am able to send interactive message with "button" type and 3 buttons with image header. But sending interactive message with "list" type and same image header fails with error:

{
  "meta": {
    "api_status": "stable",
    "version": "2.39.4"
  },
  "errors": [
    {
      "code": 1008,
      "title": "Required parameter is missing",
      "details": "Failed building interactive message. Invalid Header."
    }
  ]
}

Is it possible that "list" interactive messages doesn't support "image" header without stating it in documentation?

Successful "button" interactive payload (image URL changed):

{
  "to": "972000000000",
  "type": "interactive",
  "interactive": {
    "body": {
      "text": "Select a branch for the takeaway by writing the name/number"
    },
    "action": {
      "buttons": [
        {
          "reply": {
            "id": "MQ==",
            "title": "1"
          },
          "type": "reply"
        },
        {
          "reply": {
            "id": "Mg==",
            "title": "2"
          },
          "type": "reply"
        }
      ]
    },
    "type": "button",
    "header": {
      "image": {
        "link": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png"
      },
      "type": "image"
    }
  }
}

Successful "button" interactive message result: Successful button interactive message with image header

Failed "list" interactive payload (image URL changed):

{
  "to": "972000000000",
  "type": "interactive",
  "interactive": {
    "body": {
      "text": "Select a branch for the takeaway by writing the name/number"
    },
    "action": {
      "button": "Options",
      "sections": [
        {
          "rows": [
            {
              "id": "MQ==",
              "title": "1"
            },
            {
              "id": "Mg==",
              "title": "2"
            },
            {
              "id": "Mw==",
              "title": "3"
            },
            {
              "id": "NA==",
              "title": "4"
            },
            {
              "id": "NQ==",
              "title": "5"
            },
            {
              "id": "Ng==",
              "title": "6"
            },
            {
              "id": "Nw==",
              "title": "7"
            },
            {
              "id": "OA==",
              "title": "8"
            },
            {
              "id": "OQ==",
              "title": "9"
            },
            {
              "id": "MTA=",
              "title": "10"
            }
          ]
        }
      ]
    },
    "type": "list",
    "header": {
      "image": {
        "link": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png"
      },
      "type": "image"
    }
  }
}

CodePudding user response:

Well, it does state it in the docs. I'm just blind:

enter image description here

Kinda weird though "image" header not supported for "list".

  • Related