直达内容

Download Attachment

GET /attachments/:id

Use the :id to get a specific attachment.

All attachments are stored on Amazon S3 and downloaded via HTTP, see S3 Documentation for more information.

API 端点 URL

 https://api.mixin.one/attachments/:id

授权和其他选项

授权
Authorized
限制No limitation

参数

id
*必须
The attachment id. You can get it from POST /attachemts

请求示例

curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" https://api.mixin.one/attachments/$ATTACHMENT_ID
attachment data
{
"data": {
"type": "attachment",
"attachment_id": "7a54e394-1626-4cd4-b967-543932c2a032",
// the url to view the attachment
"view_url": " ... ",
// the url to upload the attachment
"upload_url": " ... ",
}
}
信息

You can download the attachment through view_url. If the API returns a 404, it means that the file does not exist or has expired.