Download an attachment
GET
/attachments/{id}Answers with a redirect to the file, at a signed address that works for a short time. Follow it, as HTTP clients do by default.
Needs the permissionattachments:read
The file comes from storage, not from the API. Don’t keep the address: it expires, which is why the redirect is never cached.
Path parameters
idstringrequired- The file, from a message’s
attachments.
Returns
302 Found, with the file’s address in Location.
Errors
401invalid_key- The key is wrong, expired or revoked. With no Authorization header at all, the code is
missing_credentials. 403missing_scope- The key doesn’t have
attachments:read. TheX-Required-Scopeheader names what’s missing. 404not_found- There’s no such file, the key’s owner can’t see it, or its upload was never confirmed.
429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds.