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);
This response has no body data.
Attachments
Get file
Redirects to a signed URL where the attachment file can be downloaded. URL is short-lived, so redirect should be followed immediately.
GET
/
attachments
/
{attachment_id}
/
file
JavaScript
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);