Skip to main content

Create Presigned Object URL

POST 
/storage/buckets/:bucketName/:objectName/presigned_url

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

Request

Path Parameters

    bucketName stringrequired

    The name of the bucket

    objectName stringrequired

    The name of the object

Body

    ttl integer

    Possible values: >= 1 and <= 604800

    The time to live of the token in seconds

Responses

200: Presigned URL Object Response

Request samples


curl -L 'https://api.telnyx.com/v2/storage/buckets/:bucketName/:objectName/presigned_url' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"ttl": 60
}'

Response samples


{
"content": {
"token": "string",
"presigned_url": "string",
"expires_at": "2024-07-29T15:51:28.071Z"
}
}