I'm trying to send a document media message in Whatsapp Business API using LINK instead of uploading the file, but I got the following error:

"errors":[         {            "code":1008,          "title":"Required parameter is missing",          "details":"Parameter 'id' is mandatory for type 'document'"       }    ] 

Here is the JSON request object:

{      "recipient_type":"individual",    "to":"TELEPHONE_NUMBER_HIDDEN",    "type":"document",    "document":{         "link":"google-drive/https://drive.google.com/open?id=HIDDEN_DOCUMENT_ID",       "provider":{            "name":"google-drive"       },       "caption":"CAPTION MESSAGE"    } } 

Do you have any idea regarding this? I can't use external services like Twilio.

Tag:whatsapp, image, media, document

Only one comment.

  1. Ani

    If you are using the cloud API and not the On-premises API then remove that "provider" option.

    { "messaging_product": "whatsapp", "to": "TELEPHONE_NUMBER_HIDDEN", "type": "document", "document": { "link":"LINK_HERE", "filename": "OPTIONAL_FILENAME" }

Add a new comment.