import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const file = await client.beta.files.retrieve('file_id');
console.log(file.id);{
"id": "<string>",
"size": 123,
"md5_checksum": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"object": "file",
"tags": {},
"duration_seconds": 123
}import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const file = await client.beta.files.retrieve('file_id');
console.log(file.id);{
"id": "<string>",
"size": 123,
"md5_checksum": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"object": "file",
"tags": {},
"duration_seconds": 123
}Successful Response
The identity that created the entity.
Show child attributes
"file"