Error sending image attachments using api


I’m using the ruby-intercom library to send messages through the api, and I’m getting the following error when trying pass an array of image urls as the attachment_urls key.

ERROR: Could not retrieve attachment from [image url omitted]

Here’s the code…

        from: { type: 'user', id: },
        body: body,
        attachment_urls: media

The images are coming from Twilio, which stores the images on aws and has them set to leave off the image extension. Could the lack of image extension be the cause?



Hey @nerboda

Could be any number of things at play here :grimacing: Could you please contact us via the Messenger in your Intercom workspace? That way one of us can pick it up and check logs etc.




@murtron will do thanks.



Just wanted to close the loop here :smile: As per your conversation with Adam, the issue is that our API client doesn’t work with inline content disposition and you’re following up with Twilio support to see if there’s a workaround on their end.



@murtron correct. Twilio doesn’t have a workaround, but I was able to put together a slightly hacky solution that works and will do the job for now. I’m proxying requests through my web application, which allows me to grab the image from s3 and add the content-disposition=inline header.

1 Like


Thanks for the update! Glad you found a solution for now.

I’ve also flagged this as a feature request for our dev team to consider :+1:

1 Like