Retrieving a Conversation's Attachments

You may have noticed in the Message Model that there may be attachments included in messages. These attachments will be hosted and available for you to download securely using the following GET request format

GET https://driftapi.com/attachments/{DOC_ID}/data

Example attachment in a message:

{
  ...
  "attachments": [
    {
      "fileName": "online.png",
      "mimeType": "image/png",
      "url": "https://driftapi.com/attachments/581264/data"
    }
  ]
}

As an example, retrieving this attachment could be achieved via the following curl request:

curl -X GET \                                                  
  https://driftapi.com/attachments/581264/data \ 
  -H 'Authorization: Bearer {TOKEN}' \
  --output=attachment.png # or other file name/type.

This will download the contents of the above attachment into a local file called attachment.png.