import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.storage.buckets.createPresignedURL('', { bucketName: '' });
console.log(response.content);{
"content": {
"token": "<string>",
"presigned_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}Returns a timed and authenticated URL to get an object. This is the equivalent to AWS S3’s “presigned” URL. Please note that Telnyx performs authentication differently from AWS S3 and you MUST NOT use the presign method of AWS s3api CLI or sdk to generate the presigned URL.
Refer to: https://developers.telnyx.com/docs/cloud-storage/presigned-urls
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.storage.buckets.createPresignedURL('', { bucketName: '' });
console.log(response.content);{
"content": {
"token": "<string>",
"presigned_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name of the bucket
The name of the object
The time to live of the token in seconds
1 <= x <= 604800[60]Was this page helpful?