PutObject upload, and you hand that URL to PDFShift as the destination.
This means you keep full control: the credentials never leave your infrastructure, and the URL you generate is short-lived and scoped to one specific object.
1. Generate a pre-signed URL
Following Cloudflare’s guide on pre-signed URLs, create an R2 API token (Access Key ID + Secret Access Key) and use it with any S3-compatible client to sign aPutObject request.
Point the S3 client at your R2 endpoint, which has the form:
boto3:
2. Pass the URL to PDFShift
The URL returned by the client will look like the following:s3_destination parameter. PDFShift detects the r2.cloudflarestorage.com host and uploads the converted PDF straight to your bucket using the signature you provided.