Download a file attached to a comment or to a chat message. The browser shows JPEG, PNG, GIF, WebP, BMP and AVIF images. Other files are sent as downloads. Clients cannot get the files of a chat. A vendor must have a task on the entity.
GET
/data/attachment-files/{attachment_file_id}/file/{file_name}
curl
curl -X GET "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25/file/document.pdf" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25/file/document.pdf"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())