0

Iam trying to use gupshup whatsapp business api through template.

My template expects a link url for the attachment therefore iam building an url through buffer in nodejs and having given response type for the link url as this.

       statusCode: 200,
       headers: {
           "content-type": "application/pdf",
           'content-disposition': 'inline; filename=suresign.pdf',
           'Accept-Ranges': 'bytes',
           'Content-Length': buffer.length,
       },
       body: buffer.toString('base64'),
       isBase64Encoded: true
   }```


Iam able to generate message id
```{"messageId":"8427c6aa-8140-4d79-a835-ba8f44f6c867","status":"submitted"}```


but in gupshup callback response im getting error as this

```{
   "app": "SureCredsLIVE",
   "timestamp": 1654016941604,
   "version": 2,
   "type": "message-event",
   "payload": {
       "id": "8427c6aa-8140-4d79-a835-ba8f44f6c867",
       "type": "failed",
       "destination": "918553220750",
       "payload": {
           "code": 1011,
           "reason": "Invalid Media Size"
       }
   }
}```

Syed Zahid
  • 21
  • 3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 31 '22 at 22:37
  • Iam trying to call an template based whatsapp api which expects me to send attachment link... Iam providing the link and the api is successfully called with message id but in callback url response iam getting invalid media size. – Syed Zahid Jun 01 '22 at 04:38

0 Answers0