Uploading image with Intercom API

1.1k Views Asked by At

I am trying to send an image to Intercom using the user reply API. User Reply API doc

There is an option to provide the image urls as attachments to the user reply, but is there a method to upload an image from the file system directly as an attachment?

2

There are 2 best solutions below

0
On BEST ANSWER

Right now the Intercom API does only support attaching file URLs, rather than the file itself.

0
On

You can include the image URL link within the attachment_urls section for sending.

{
  "message_type": "comment",
  "type": "admin",
  "body": "Docs",
  "admin_id": "6956236",
  "attachment_urls": [
    "https://media.istockphoto.com/id/1409704770/photo/close-up-lavender-flowers-in-beautiful-field-at-sunset.jpg?s=1024x1024&w=is&k=20&c=AMncBX6r3gLl3MgfobtBI013noVbZk7JAUparGJFCME="
  ]
}