Redirects to a signed URL where the attachment file can be downloaded. URL is short-lived, so redirect should be followed immediately.
Authorization
authorization AuthorizationBearer <token>
In: header
Path Parameters
attachment_id*string
The ID of the attachment.
Response Body
application/json
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const response = await client.attachments.getFile('att_01kfyc9dgdec1avkgs7tng8htg');
console.log(response.error);Empty
{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}