Get a message attachment
/v1/amb/messages/{message_id}/attachments/{index}bird amb attachment <message-id> <index>curl -X GET "https://us1.platform.bird.com/v1/amb/messages/{message_id}/attachments/{index}" \
-H "Authorization: Bearer $TOKEN"Downloads the attachment at the zero-based index in a message's
text.attachments array and returns its decrypted bytes with the
media type the attachment declares. A declared PNG, JPEG, GIF or WebP
type is kept only when the bytes match it; a missing, malformed or
mismatched type returns application/octet-stream. The
Content-Disposition header carries the original filename.
Works for attachments a customer sent and for attachments
you sent. For a received attachment, message_id is the message.id
of the amb.received webhook event, and index is the attachment's
position in that message's text.attachments array.
Apple retains an attachment for about 30 days; availability after that
period is not guaranteed, so download an attachment when the message
arrives rather than on demand later. An unknown message or
index returns 404; an attachment Apple no longer holds returns
503.
Parametry
message_idstringMessage identifier. Starts with amb_. For a received attachment, use the message.id from the amb.received webhook event.
indexintegerZero-based position in the message's text.attachments array.
Powiązane zasoby
Przejdź do dokumentacji, przewodników i przykładów dotyczących tego tematu.