Partial Outageshare-external
I has error [...] when attachment my image to send message
3

I has error [...] when attachment my image to send message. Please help me resolve it! curl --location 'https://graph.facebook.com/v21.0/409069832300277/message_attachments' \ --header 'Content-Type: application/json' \ --data '{ "access_token":"EAAGE...", "message":{ "attachment":{ "type":"image", "payload":{ "url":"https://api.biabudvar.cz/api/media/public/89acebd35105a5f73f29dec513b10bcfbd.jpg", "is_reusable": true } } } }'

Đoàn
Asked on Monday
Đoàn

this is my response { "error": { "message": "(#100) Upload attachment failure.", "type": "OAuthException", "code": 100, "error_subcode": 2018047, "fbtrace_id": "AHbQ-NKPO00I0VBU2u151H2" } }

November 18 at 12:04 PM
Selected Answer
1

Hi Đoàn,

The reason you're getting this error is because content-type header is missing in the response from the URL. You can check this by running the following in your terminal: curl -i "https://api.biabudvar.cz/api/media/public/89acebd35105a5f73f29dec513b10bcfbd.jpg". This will show the headers of the response. The Content-Type header should indicate the MIME type(e.g., image/jpeg). If you control the image hosting server, ensure that the correct Content-Type is set in the HTTP headers for the file.

Thanks, Meta Support for Business Messaging

November 19 at 3:49 PM
Naghmeh